Hi folks
I have set up an form that when submitted sends an email, however I want to suppress the information in the email if it is left blank in the form.
an example of the existing PHP code I have is
?php
$to_email_address = "someone@someone.com";
$from_email_address = "$email";
$replay_email_address = "$email";
$returnpath_email_address = "someone@someone.com";
if (isset($_POST)){
foreach($_POST as $k => $v){
if(is_array($_POST[$k])){
foreach ($_POST[$k] as $k1 => $v1){
eval("\$$k" . "[". $k1 . "] = myAddSlashes(\$v1);");
}
} else {
eval("\$$k = myAddSlashes(\$_POST['$k']);");
}
}
}
<tr>
<td>Cylcing 1:</td>
<td>$cycling1 </td>
</tr>
<tr>
<td>Cycling Experience 1:</td>
<td>$cyclingEx1 </td>
</tr>