Hello all,
I’m VERY new to php programming.
I have mastered the basics of putting together a form and receiving the results of that form through email, while letting visitors land on a “thank you for filling this out” page.
My problem is now I need to program a page that allows me to receive those results by email, but at the same time, I need to redirect the user to one of three pages, based on the radio button they select.
My form is currently on an htm page. What is the easiest way to make this form email me the results (including which radio button is selected) – then redirect the user to one of those three pages using only php?
I did a search and found this code, which I inserted into the code of the php form that the page redirects to after clicking “submit”:
if($_POST[‘order’] == ‘1’) {
header(“Location: Order_1-test.htm”);
} else if ($
header(“Location: Order_2-test.htm”);
} else if ($_POST[‘order’] == ‘3’) {
header(“Location: Order_3-test.htm”);
}
but it gave me an error:
Warning: Cannot modify header information – headers already sent by (output started at /home/brandnew/public_html/order.php:2) in /home/brandnew/public_html/order.php on line 27
I am VERY confused and need guidance.
Please, and thank you in advance.
Phil