HI, I have the following script that lists all the variables from a form on the previous page and then lists them in a table, and sends the table as an html email.
Is there a way to have the script bypass or not list certain hidden fields from the previous page?
<?
/****************************/
/* Collect Variables Script */
/****************************/
foreach ($_POST as $key => $value) {
echo '<table width="687" border="1" cellpadding="3" cellspacing="3" bordercolor="#EAEAEA" bgcolor="#EAEAEA">
<tr bordercolor="#999999" bgcolor="#FFFFFF">
<td width="182"><font size="2" face="Arial, Helvetica, sans-serif">' . $key .'</font></td>
<td width="475"><font size="2" face="Arial, Helvetica, sans-serif"><strong> '. $value .'</strong></font></td>
</tr>
</table>';
$mailbody .= '<table width="687" border="1" cellpadding="1" cellspacing="3" bordercolor="#EAEAEA" bgcolor="#EAEAEA">
<tr bordercolor="#999999" bgcolor="#FFFFFF">
<td width="182"><font size="2" face="Arial, Helvetica, sans-serif">' . $key .'</font></td>
<td width="475"><font size="2" face="Arial, Helvetica, sans-serif"><strong> '. $value .'</strong></font></td>
</tr>
</table>';
}
/*********************/
/* Header Variables */
/*********************/
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $sender_email\r\n";
$headers .= "Cc: $ccSendto\r\n";
$headers .= "Bcc: $bccSendto\r\n";
/*******************/
/* Sendmail Script */
/*******************/
mail($mSendto,$mSubject,$mailbody,$headers);
?>
<html>
<head>
<title>Email Sent</title>
</head>
<body bgcolor="#EAEAEA">
<table width="682" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><div align="center"><font color="#006699" size="2" face="Arial, Helvetica, sans-serif"><strong>Your
Email Sent.<br>
Thank You.</strong></font></div></td>
</tr>
</table>
</body>
</html>
😕