Ok this is the script that handles the form submission and input's it to the SQL database. It works 100%.
What I would now like the script to do is to send the user to another page - what do I use to automatically redirect?
I've tried:
and
And neither works - could someone point me in the right direction please?
My thanks in anticipation
Code:
<?php
$con = mysql_connect("*****","*****","*****");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("ccsdesig_first", $con);
$sql="INSERT INTO ***** (Name,Surname,Number,Email,MovingFrom,MovingTo,Date)
VALUES ('$_POST[Name]','$_POST[Surname]','$_POST[Number]','$_POST[Email]','$_POST[MovingFrom]','$_POST[MovingTo]','$_POST[Date]')";
$sql="INSERT INTO destination (CurrentPremises,CurrentFloor,DestinationPremises,DestinationFloor,WrapEverything,Unpack,Hangerpack,SendMaterials,InsureEverything)
VALUES ('$_POST[CurrentPremises]','$_POST[CurrentFloor]','$_POST[DestinationPremises]','$_POST[CurrentFloor]','$_POST[WrapEverything]','$_POST[Unpack]','$_POST[Hangerpack]','$_POST[SendMaterials]','$_POST[InsureEverything]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
mysql_close($con)
echo "Done";
?>
I've tried:
Code:
header("Location:http://www.xxxxxxx.com/viewguestbook2.php");
Code:
<META HTTP-EQUIV="refresh" content="0;URL=index.php">
My thanks in anticipation
Comment