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 –
<?php
setcookie("email", $email, time() + 60 * 60 * 24 * 7);
?>
This sets the cookie
On the login page I have this –
<tr><th><p>Email:</p></th> <td><p><input type="text" name="strEmail" maxlength="40"
value="<?php print($strEmail); ?>"/></p></td></tr>
How can I fill in the email only if the cookie was set?
Add this line above that input: