foochuck Posted August 9, 2008 Share Posted August 9, 2008 I've created a simple login form on my website - it has a field for a phone number, username and password like so: <form action=self.php METHOD=POST> <fieldset> <legend>Welcome to On-Line Ordering</legend> Enter your phone number: <INPUT TYPE="text" NAME="WIPHNARA" SIZE=3 MAXLENGTH=3 Value='' > <INPUT TYPE="text" NAME="WIPHNNBRPRE" SIZE=3 MAXLENGTH=3 Value='' > <INPUT TYPE="text" NAME="WIPHNNBRSUF" SIZE=4 MAXLENGTH=4 Value='' > <BR><BR>Enter your email address: <INPUT TYPE="TEXT" NAME="WIEMAIL" SIZE=60 MAXLENGTH=60 Value='' > <BR><BR>Enter your password: <INPUT TYPE="PASSWORD" NAME="WICUSTNO" SIZE=6 MAXLENGTH=6 Value='' > <BR><BR><BR><INPUT TYPE="submit" VALUE="Request Authorization" NAME="WIBUTTON"> </fieldset> </form> Is there a way to make the form retain the phone, username & password info so the people don't have to retype it everytime they come back to my website? Foo Link to comment https://forums.phpfreaks.com/topic/118865-make-a-form-retain-the-username-password/ Share on other sites More sharing options...
MasterACE14 Posted August 9, 2008 Share Posted August 9, 2008 you can do that. However, it does pose a security risk. Especially if the user has logged on from a Internet Cafe. Link to comment https://forums.phpfreaks.com/topic/118865-make-a-form-retain-the-username-password/#findComment-612147 Share on other sites More sharing options...
PC Nerd Posted August 9, 2008 Share Posted August 9, 2008 you can have a remember me button etc - and itll set a cooking on the serer: once the cookie is created: if($_COOKIE['rememberMe'] == true) { if(isset($_POST['username'])) { echo $_POST['username'] } } of course you would echo teh input HTML or howveer you want to do it but thats what youll be lookign for. gdlk Link to comment https://forums.phpfreaks.com/topic/118865-make-a-form-retain-the-username-password/#findComment-612153 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.