j634 Posted December 14, 2007 Share Posted December 14, 2007 Hi all, I have a lost password form that requires an email address. On my web page this code shows up in the email box (where a person puts their email) value="<?=$_POST['mail']?> The examples I found all use the same code. Here is the code: <?php if($_GET['f']=='forgot') { ?> <form method="post" action="users.php?f=forgot" style="margin:0px"> <input type="hidden" name="a" value="forgot"> <?php $t=explode(' ', microtime()); $uniqCode=uniqid($t[1]); session_register('uniqCode'); print ('<input type="hidden" name="uniqId" value="'.$uniqCode.'">'); ?> <table align="center" border="0" cellspacing="5"> <tr><td style="text-align:center; height:21px; font-weight:bold" colspan="2">Enter your e-mail:</td></tr> <tr><td width="50">E-mail: </td><td width="180"><input type="text" name="mail" value="<?=$_POST['mail']?>"></td></tr> <tr><td style="text-align:center"; colspan="2"><input type="button" value=" SUBMIT " onClick="this.form.submit();this.disabled=true"></td></tr> </table> Thanks, j634 Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted December 14, 2007 Share Posted December 14, 2007 try this: <?php if($_GET['f']=='forgot') { ?> <form method="post" action="users.php?f=forgot" style="margin:0px"> <input type="hidden" name="a" value="forgot"> <?php $t=explode(' ', microtime()); $uniqCode=uniqid($t[1]); session_register('uniqCode'); print ('<input type="hidden" name="uniqId" value="'.$uniqCode.'">'); ?> <table align="center" border="0" cellspacing="5"> <tr><td style="text-align:center; height:21px; font-weight:bold" colspan="2">Enter your e-mail:</td></tr> <tr><td width="50">E-mail: </td><td width="180"><input type="text" name="mail" value="<?php echo $_POST['mail']; ?>"></td></tr> <tr><td style="text-align:center"; colspan="2"><input type="button" value=" SUBMIT " onClick="this.form.submit();this.disabled=true"></td></tr> </table> Quote Link to comment Share on other sites More sharing options...
j634 Posted December 14, 2007 Author Share Posted December 14, 2007 Thanks that worked! j634 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.