So here's what's going on...
When a user enters the information into that page, they are directed to a differant page:
they are left on that PHPpage, whereas, I would like the script to redirect to a Differant URL.
PHP Code:
<?php
$con = mysql_connect("LOCALHOST","USERNAME","PASSWORD"); //Replace with your actual MySQL DB Username and Password
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("DATABASENAME", $con); //Replace with your MySQL DB Name
$name=mysql_real_escape_string($_POST['name']); //This value has to be the same as in the HTML form file
$email=mysql_real_escape_string($_POST['email']); //This value has to be the same as in the HTML form file
$sql="INSERT INTO form_data (name,lastname,streetaddress,city,state,zipcode,phonenumber,email,date,time,timezone,coupon,itemname1,quantity1,price1,itemname2,quantity2,price2,itemname3,quantity3,price3,itemname4,quantity4,price4,itemname5,quantity5,price5,itemname6,quantity6,price6,itemname7,quantity7,price7,itemname8,quantity8,price8,itemname9,quantity9,price9,itemname10,quantity10,price10,itemname11,quantity11,price11,itemname12,quantity12,price12,sh,ordertotal) VALUES ('$name','$lastname','$streetaddress','$city','$state','$zipcode','$phonenumber','$email','$date','$time','$timezone','$coupon','$itemname1','$quantity1','$price1','$itemname2','$quantity2','$price2','$itemname3','$quantity3','$price3','$itemname4','$quantity4','$price4','$itemname5','$quantity5','$price5','$itemname6','$quantity6','$price6','$itemname7','$quantity7','$price7','$itemname8','$quantity8','$price8','$itemname9','$quantity9','$price9','$itemname10','$quantity10','$price10','$itemname11','$quantity11','$price11','$itemname12','$quantity12','$price12','$sh','$ordertotal')"; /*form_data is the name of the MySQL table where the form data will be saved.
name and email are the respective table fields*/
if (!mysql_query($sql,$con)) {
die('Error: ' . mysql_error());
}
echo "Your order is processing...";
mysql_close($con);
?>
keep in mind that I do want the user to see the "Your order is processing..." message at the top left of their screen before being redirected to a thank you page