Hi Guys can some one tell me were i have gone wrong. i have a contact form with the option to select your Recipient via a drop down select box on a html page which gets posted to some php script which then redirects you to a thank you html page. But it’s just not working can some one please look at the script and point out the problem.
HTML Page:
<FORM ACTION=”post.php”>
<TABLE BORDER=0>
<TR VALIGN=”top”>
<TD width=”160″> </TD>
<TD width=”73″><span class=”style11″>Recipient:</span></TD>
<TD width=”458″><label>
<select name=”mailto”>
<option value=”
<option value=”
<option value=”
</select>
</label></TD>
</TR>
<TR VALIGN=”top”>
<TD> </TD>
<TD><span class=”style11″>Your Name:</span></TD>
<TD><input name=”name” type=”text” size=”30″ /></TD>
</TR>
<TR VALIGN=”top”>
<TD> </TD>
<TD><span class=”style11″>Your Email:</span></TD>
<TD><input name=”email” type=”text” size=”30″ /></TD>
</TR>
<TR VALIGN=”top”>
<TD> </TD>
<TD><span class=”style11″>Priority:</span></TD>
<TD><input name=”priority” type=”text” size=”30″ /></TD>
</TR>
<TR VALIGN=”top”>
<TD> </TD>
<TD><span class=”style11″>Subject:</span></TD>
<TD><input name=”subject” type=”text” size=”30″ /></TD>
</TR>
<TR VALIGN=”top”>
<TD> </TD>
<TD><span class=”style11″>Message:</span></TD>
<TD><label>
<textarea name=”message” cols=”35″ rows=”8″></textarea>
</label></TD>
</TR>
<TR>
<TD></TD>
<TD> </TD>
<TD><label>
<input type=”submit” name=”Submit” value=”Submit” />
</label>
<INPUT TYPE=”reset” VALUE=”Reset”></TD>
</TR>
</TABLE>
</FORM>
PHP Script:
<?php
// Receiving variables
@$mailto = addslashes($_POST[‘mailto’]);
@$name = addslashes($
@$email = addslashes($_POST[’email’]);
@$priority = addslashes($
@$subject = addslashes($_POST[‘subject’]);
@$message = addslashes($
// Validation
//Sending Email to form owner
$pfw_header = “From: $emailn”
. “Reply-To: $emailn”;
$pfw_subject = “Online Contact Form”;
$pfw_email_to = “$mailto”;
$pfw_message = “mailtoperson: $mailtopersonn”
. “n”
. “name: $namen”
. “n”
. “email: $emailn”
. “n”
. “priority: $priorityn”
. “n”
. “subject: $subjectn”
. “n”
. “message: $messagen”;
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header(“Location: thankyou.html”);
?>