MrMentally
Technical User
I have a PHP page where as I copied an example and am modifying the results.
However I am a tinkerer not a full programmer and I need to be shown how to stop the action from taking place and send the data to a send receipt page. Here is the culprit...
if($_REQUEST['command']=='update'){
$name=$_REQUEST['name'];
$email=$_REQUEST['email'];
$address=$_REQUEST['address'];
$phone=$_REQUEST['phone'];
$result=mysql_query("insert into customers values('','$name','$email','$address','$phone')");
$customerid=mysql_insert_id();
$date=date('Y-m-d');
$result=mysql_query("insert into orders values('','$date','$customerid')");
$orderid=mysql_insert_id();
$max=count($_SESSION['cart']);
for($i=0;$i<$max;$i++){
$pid=$_SESSION['cart'][$i]['productid'];
$q=$_SESSION['cart'][$i]['qty'];
$price=get_price($pid);
mysql_query("insert into order_detail values ($orderid,$pid,$q,$price)");
}
die('Thank You! your order has been placed!'); <---- HOW DO I STOP THIS AND GET IT TO TRANSFER THE CUSTOMER DATA TO THE MAIL SEND PAGE AFTER SUBMISSION TO DATABASE?????????
}
?>
Any assistance would be appreciated.
Mr Mentally
However I am a tinkerer not a full programmer and I need to be shown how to stop the action from taking place and send the data to a send receipt page. Here is the culprit...
if($_REQUEST['command']=='update'){
$name=$_REQUEST['name'];
$email=$_REQUEST['email'];
$address=$_REQUEST['address'];
$phone=$_REQUEST['phone'];
$result=mysql_query("insert into customers values('','$name','$email','$address','$phone')");
$customerid=mysql_insert_id();
$date=date('Y-m-d');
$result=mysql_query("insert into orders values('','$date','$customerid')");
$orderid=mysql_insert_id();
$max=count($_SESSION['cart']);
for($i=0;$i<$max;$i++){
$pid=$_SESSION['cart'][$i]['productid'];
$q=$_SESSION['cart'][$i]['qty'];
$price=get_price($pid);
mysql_query("insert into order_detail values ($orderid,$pid,$q,$price)");
}
die('Thank You! your order has been placed!'); <---- HOW DO I STOP THIS AND GET IT TO TRANSFER THE CUSTOMER DATA TO THE MAIL SEND PAGE AFTER SUBMISSION TO DATABASE?????????
}
?>
Any assistance would be appreciated.
Mr Mentally