Yup.
But now i'm having another problem.
Now, the script processes the form data, but doesn't post anything to screen.
Could you look at this and see if I missed something? I've looked at it a hundred times and I must be blind.
$error_message="<html>
<font face=Arial size=4>
Error!</font><BR>
<font face=Arial size=3>
A required field was not completed or is in error. <BR>
Please return and re-submit the form. <BR>
<input type=\"button\" onclick=\"javascript:history.back(1);\" value=\"Go Back\">
</font>
</html>
";
// CHECK THE VALIDITY OF EMAIL ADDRESS
// If eMail is not a valid address
if ($email){
$sender=trim($email); // Remove white space from email field
//Check if email DOES NOT contain a valid form
if (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",$email)){
echo $error_message;
}
}elseif(!$email){ // If eMail is blank
echo $error_message;
}elseif(!$agree){ // If agreement is blank
echo $error_message;
}else //If email valid and agreement is valid
switch ($script_choice) {
case 1:
?><html>
<FONT FACE="Arial" SIZE="4" COLOR="#000000">
<B>Your submission was successful!</B><BR></font>
<font size=3>
You may now download the script you selected<BR>
You are ready to download: <a HREF="http://www.nsfilms.com/files/mortician.pdf">The Mortician's Tales (Wrap Script)</a>
<P><I>NOTE: It is recommended that you change your Acrobat Reader Settings by unchecking it's option, "Open in Browser".<BR>
Otherwise, the document will download and open automaticly.</I>
</FONT>
</html>
<?php
break;
case 2:
?>
<html>
<FONT FACE="Arial" SIZE="4" COLOR="#000000">
<B>Your submission was successful!</B><BR></font>
<font size=3>
You may now download the script you selected<BR>
You are ready to download: <a HREF="http://www.nsfilms.com/files/prem.pdf">Premonitions</a></FONT>
<P><I>NOTE: It is recommended that you change your Acrobat Reader Settings by unchecking it's option, "Open in Browser".<BR>
Otherwise, the document will download and open automaticly.</I>
</font>
</html>
<?php
break;
case 3:
?>
<html>
<FONT FACE="Arial" SIZE="4" COLOR="#000000">
<B>Your submission was successful!</B><BR></font>
<font size=3>
You may now download the script you selected<BR>
You are now ready to download: <a HREF="http://www.nsfilms.com/files/jghost.pdf">Johnson's Ghost</a>
<P><I>NOTE: It is recommended that you change your Acrobat Reader Settings by unchecking it's option, "Open in Browser".<BR>
Otherwise, the document will download and open automaticly.</I>
</FONT>
</html>
<?php
break;
case 4:
?>
<html>
<FONT FACE="Arial" SIZE="4" COLOR="#000000">
<B>Your submission was successful!</B><BR></font>
<font size=3>
You may now download the script you selected<BR>
<P>You are now ready to download: <a HREF="http://www.nsfilms.com/files/weasle_full.pdf">Goes the Weasle</a></FONT>
<P><I>NOTE: It is recommended that you change your Acrobat Reader Settings by unchecking it's option, "Open in Browser".<BR>
Otherwise, the document will download and open automaticly.</I>
</font>
</html>
<?php
break;
}
// All good, send eMail to Nightshade Films
$recipient="dniezby@nsfilms.com";
mail($recipient,"Script Download","
First Name: $first
Last Name: $last
Address: $address
City: $city
State: $state
Zip: $zip
Phone: $phone
email: $email
Script: $script_choice
","FROM:$email");
?>