|
Posted by J.O. Aho on 01/07/08 05:43
jcage@lycos.com wrote:
> Hello,
>
> I have a form that uses a basic passphrase to ensure an employee user
> is who they say they are. One field uses 'text' as the input type and
> the other uses 'password'. When a query has been run, a user can
> click the browser back button and the name is still there intact but
> the password field is blank. My question is, what would the 'SESSION'
> code look like that would allow a user to click their back button
> where the 'userpass' field holds the original passphrase in the same
> manner the browser holds the user name within the text field?
Using Session will require that the user is logged in before the password will
be there.
--- page that gets the username/password ---
session_start();
$_SESSION['password']=$_POST['userpass']; // we assume you use default post
--- eoe ---
--- the login form ---
<td>User Password:</td><td align="left"><input type="password"
name="userpass" size="29" maxlength="30" value="<?php echo
$_SESSION['password']; ?>"></td></tr>
--- eoe ---
If you want the password to be stored between sessions, then you have to use
cookies, which means you store the password in plain text on the client computer.
I suggest you talk with the system administration and ask if it would be
possible to upgrade the browsers to a more modern one, visit mozilla.org if
you want a browser that can store both the username and password and on top of
all encrypts the password it stores.
--
//Aho
Navigation:
[Reply to this message]
|