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
https://forums.phpfreaks.com/topic/81623-solved-value-shows-in-email/
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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.