Sign in to follow this  

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

This topic is 2844 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
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
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
Quote:
Original post by Wan
There exists a autocomplete property you can set to off (not sure about browser support), but there should be a less ugly solution.


That works perfectly, I'm not sure how it's at all ugly? There is not reason the browser should fill in that information anyway.

Share this post


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


That works perfectly, I'm not sure how it's at all ugly? There is not reason the browser should fill in that information anyway.

Because it changes the browser's default behavior. I personally never use the remember password option, but I can imagine that it's quite annoying for someone who relies on this functionality.

Share this post


Link to post
Share on other sites

This topic is 2844 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this