I am trying to set up a script where the user is submitted to a different page depending upon button hit. Used code according to previous posts here. Looks right, but not working. User goes to blank page with the url for the php script. Can you take a look and see what the problem might be. I am a newbie and having trouble figuring out what's wrong. Portion of Code is below.
$fp = fopen($array['filename'],"a");
if($fp){
fwrite($fp,$final_data); //Write information to the file
fclose($fp); // Close the file
mail ($mailto, $mailsubject, $email_data, "From: <$mailfrom>"); //send mail
// send autoresponse to registrant
mail ($array[Email],$mailsubject,"Thank you for registering for the 2007 Summer Jamboree Dance Camp. If you have not already submitted your payment online through PayPal, please send us your registration payment as soon as possible.", "From: <$mailfrom>");
// send to page based on submit button
if ($_POST['submit']){
header("Location: $continue");
} elseif($_POST['submit_pay']){
header("Location: $continue_pay");
} else {
header("Location: $error");
}
}
The form is in html. Buttons are named submit & submit_pay. $continue and $continue_pay are the urls I want them to go to. Any help greatly appreciated.