Jump to content
  • Advertisement
Sign in to follow this  
SteveDeFacto

[web] Registration page wont forget login information...

This topic is 3095 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a login page and a register page, after the user logs into an account and the browser remembers their login information it then places this information into the "cemail" and "password" inputs on the register page. I don't want it to do this, here is my code: Register Page:
<?php
  include('header.php');
?>
<table width="400px" border = "1" style = "margin-left: auto; margin-right: auto;">
  <form method="get" action="register.php">
    <th bgcolor = "#505050" colspan="2" style = "color: white;">
      Member Register
    </th>
    <tr bgcolor = "#E8E8E8">
      <td width = "150px">Username</td>
      <td><input name="username" id="username" type="text" value=""></td>
    </tr>
    <tr bgcolor = "#E8E8E8">
      <td>Email</td>
      <td><input name="email" id="email" type="text" value=""></td>
    </tr>
    <tr bgcolor = "#E8E8E8">
      <td>Confirm Email</td>
      <td><input name="cemail" id="cemail" type="text" value=""></td>
    </tr>
    <tr bgcolor = "#E8E8E8">
      <td>Password</td>
      <td><input name="password" id="password" type="password" value=""></td>
    </tr>
    <tr bgcolor = "#E8E8E8">
      <td>Confirm Password</td>
      <td><input name="cpassword" id="cpassword" type="password" value=""></td>
    </tr>
    <tr bgcolor = "#E8E8E8">
      <td colspan="2"><input type="submit" name="Submit" value="Register"></td>
    </tr>
  </form>
</table>



Login Page:
<?php
  include('header.php');
?>
<table width="400px" border = "1" style="margin-left: auto; margin-right: auto;">
  <form method="get" action="login.php">
    <th bgcolor = "#505050" colspan="2" style = "color: white;">
      Member Login
    </th>
    <tr bgcolor = "#E8E8E8">
    <td colspan="2">You are currently not logged in.
Enter your username next to the Username label and
your password next to the Password label, then click
on the Login button.</td>
    </tr>
    <tr bgcolor = "#E8E8E8">
      <td width = "100px">Username</td>
      <td><input name="username" type="text" id="username"></td>
    </tr>
    <tr bgcolor = "#E8E8E8">
      <td>Password</td>
      <td><input name="password" type="password" id="password"></td>
    </tr>
    <tr bgcolor = "#E8E8E8">
      <td colspan="2"><input type = "checkbox" name="AutoLogin" <?php if($_COOKIE['AutoLogin'])echo( 'checked' ); ?> >Log in automatically</td>
    </tr>
    <tr bgcolor = "#E8E8E8">
      <td colspan="2"><input type="submit" name="Submit" value="Login"></td>
    </tr>
  </form>
</table>



Share this post


Link to post
Share on other sites
Advertisement
I don't really understand the questin but why are you using CSS and tables? My advice is stick to CSS and lay out everything with it but tables are fine too, just stick to one kind (IMHO)

Share this post


Link to post
Share on other sites
Quote:
Original post by SteveDeFacto
I have a login page and a register page, after the user logs into an account and the browser remembers their login information it then places this information into the "cemail" and "password" inputs on the register page.

I don't want it to do this
Why not? The whole point is so the user doesn't have to type the details in every time.

One solution I can think of is to give the fields a random name each time - the browser probably populates them based on their name attribute and the URL they're on.
Another (probably less useful) solution is to use HTTPS, since browsers tend not to remember form information for HTTPS connections (for obvious reasons).

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
Quote:
Original post by SteveDeFacto
I have a login page and a register page, after the user logs into an account and the browser remembers their login information it then places this information into the "cemail" and "password" inputs on the register page.

I don't want it to do this
Why not? The whole point is so the user doesn't have to type the details in every time.

One solution I can think of is to give the fields a random name each time - the browser probably populates them based on their name attribute and the URL they're on.
Another (probably less useful) solution is to use HTTPS, since browsers tend not to remember form information for HTTPS connections (for obvious reasons).


cemail does not have the same name or id as username, I think it's just looking for a password field then it guesses that is the login.

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
Quote:
Original post by SteveDeFacto
I have a login page and a register page, after the user logs into an account and the browser remembers their login information it then places this information into the "cemail" and "password" inputs on the register page.

I don't want it to do this
Why not? The whole point is so the user doesn't have to type the details in every time.
This. If your web application actively tries to prevent my browser from remembering my login details, then you just lost a potential customer.

Share this post


Link to post
Share on other sites
Quote:
Original post by swiftcoder
Quote:
Original post by Evil Steve
Quote:
Original post by SteveDeFacto
I have a login page and a register page, after the user logs into an account and the browser remembers their login information it then places this information into the "cemail" and "password" inputs on the register page.

I don't want it to do this
Why not? The whole point is so the user doesn't have to type the details in every time.
This. If your web application actively tries to prevent my browser from remembering my login details, then you just lost a potential customer.


It's placing the inputs in the wrong area, taking the user name and placing it into the email address, it's using information from another page. It's just an annoying thing for anyone who is trying to register an account...

here is my site judge for yourself, register an account, login then logout and go back to the register page.

It places the username into the email input... It's not suppose to do that...

I just started working on this new site so nothing other then the login and register works.

Share this post


Link to post
Share on other sites
Quote:
Original post by SteveDeFacto
here is my site judge for yourself, register an account, login then logout and go back to the register page.
This begs the question of why a user would want to create two account in a row?
Quote:
It places the username into the email input... It's not suppose to do that...
Works perfectly in my browser (Safari). Maybe an IE issue?

Share this post


Link to post
Share on other sites
Quote:
Original post by swiftcoder
Quote:
Original post by SteveDeFacto
here is my site judge for yourself, register an account, login then logout and go back to the register page.
This begs the question of why a user would want to create two account in a row?
Quote:
It places the username into the email input... It's not suppose to do that...
Works perfectly in my browser (Safari). Maybe an IE issue?


Nope I tested it on all browsers.

EDIT: Safari is the only one I forgot to test and thats the only one it works on lol

Share this post


Link to post
Share on other sites
Added reg_ to all the names and IDs, it didn't work, it's not based on the name or ID... Seems to be looking for the first password input and places it in there...

Share this post


Link to post
Share on other sites
There exists a autocomplete property you can set to off (not sure about browser support), but there should be a less ugly solution.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!