I want to generate a code to use to have a drop down menu in the Contact box and the selected option in the drop down box is sent in the Contact box. Here's the code I have:
<?php
$EmailFrom = "email@email.com";
$EmailTo = "email2@email.com";
$Subject = "Contact Request";
$FirstName = Trim(stripslashes($POST['FirstName']));
$LastName = Trim(stripslashes($POST['LastName']));
$Phone = Trim(stripslashes($POST['Phone']));
$Email = Trim(stripslashes($POST['Email']));
$LoanStatus = array ('Current','1 Month Past Due','2 Months Past Due','3+ Months Past Due');
$Comments = Trim(stripslashes($_POST['Comments']));
$Body = "";
$Body .= "FirstName: ";
$Body .= $FirstName;
$Body .= "\n";
$Body .= "LastName: ";
$Body .= $LastName;
$Body .= "\n";
$Body .= "Phone: ";
$Body .= $Phone;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$LoanStatus = array ('Current','1 Month Past Due','2 Months Past Due','3+ Months Past Due');
$LoanStatus = array ('Current','1 Month Past Due','2 Months Past Due','3+ Months Past Due');
$LoanStatus = array "\n";
$Body .= "Comments: ";
$Body .= $Comments;
$Body .= "\n";
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=formsent.html\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>
Here's the drop down menu code:
<select name="LoanStatus" id="LoanStatus" class="cat_dropdown">
<option value=" ">-- Please select --</option>
<option value="Current">Current</option>
<option value="1 month past due">1 month past due</option>
<>Loan Status
<option value="2 months past due">2 months past due</option>
<option value="3+ months past due">3+ months past due</option>
</select>
How would I put the code in the PHP script (the first one) so the drop down menu appears in the email?
Thanks.