Posted by ZeldorBlat on 11/02/05 18:35
>It's my understanding that to do this I would write the information to
>a cookie (after he successfully logs in with the option checked).
Yes.
>What I'm not clear on is, how do I get the userid from the cookie into the
>text box on the log-in page? Do I read the cookie when he "hits" the >log-in page and then load the text box before I send out the page?
If the browser sends a cookie, you'll find the value of any cookie
variables in $_COOKIE[]. So grab the value from there (i.e.
$_COOKIE['username']) and use it when you build the HTML for the
textbox:
$username = $_COOKIE['username'];
echo '<input type="text" name="username" value="$username"/>';
Navigation:
[Reply to this message]
|