Jump to content

[SOLVED] value="<?=$_POST['mail']?> shows in email


j634

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.