hi there,
i have 3 pages
buyprint.php
order.php
confirm.php
buyprint.php displays painting's built from php/mysql. with an order button below each painting.
if you click on order it passes the details to order.php as a form.
order.php then displays these details and lets you enter your name, email etc and again you hit the order button
and it passes the details to confirm.php as a form.
confirm.php simply sends an email to the company and an auto response as well and displays the details as read only.
now, hope i haven't bored you so far,
my problem is if an email address hasn't been entered in order.php it hits an error as confirm.php doesn't have an email
address to send an auto response to.
my initial solution was to use,
if ((!$sender_name) || (!$sender_email)) {
header( "Location: http://bla.bla.com");
exit;
}
this partly works as it will return you to order.php BUT none of the original detail is displayed, so basically i need to find
a way of either returning all the relevant detail back to order.php (with possibly a message string saying please enter email etc)
or have a way of checking on order.php that the name and email address have been entered before/during the order form
button being pressed.
any ideas,
so to put it in a nutshell, is there a way or returning variables to a php page when the
if ((!$sender_name) || (!$sender_email)) {
header( "Location: http://bla.bla.com");
exit;
}
kicks in.
cheers,
Mat