filling in a form with a cookies

elxperto

New Member
I have a form that allows a user to enter their username and password into my site. I'm looking for a way to have the email part automatically filled in if a cookie I set was found. On one page I have -\[code\]<?php setcookie("email", $email, time() + 60 * 60 * 24 * 7);?>\[/code\]This sets the cookieOn the login page I have this -\[code\]<tr><th><p>Email:</p></th> <td><p><input type="text" name="strEmail" maxlength="40"value="http://stackoverflow.com/questions/13771109/<?php print($strEmail); ?>"/></p></td></tr>\[/code\]How can I fill in the email only if the cookie was set?
 
Back
Top