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 Link to comment https://forums.phpfreaks.com/topic/81623-solved-value-shows-in-email/ 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> Link to comment https://forums.phpfreaks.com/topic/81623-solved-value-shows-in-email/#findComment-414638 Share on other sites More sharing options...
j634 Posted December 14, 2007 Author Share Posted December 14, 2007 Thanks that worked! j634 Link to comment https://forums.phpfreaks.com/topic/81623-solved-value-shows-in-email/#findComment-414648 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.