Snetty
07-21-2005, 01:19 PM
I'm working on my custom checkout page for my new site at the moment, and it seems to be forgetting all of the non-session variables.
$page = "login.php";
include ('./header.php');
if (isset ($_POST['submit1'])) {
include ('./stage1validate.php');
} else if (isset($_POST['submit2'])) {
include ('./stage2validate.php');
} else if (isset($_POST['submit3'])) {
include ('./stage3validate.php');
} else if (isset($_POST['submit4'])) {
include ('./stage4validate.php');
} else if (isset($_POST['submit5'])) {
include ('./stage5.php');
} else {
include ('./stage1view.php');
}
include ('./footer.php');
That's the main checkout.php file. I'm guessing that include's don't pass variables to each other or something... why not? Is there a way around it other than using sessions, which i really don't want to do as I want the variables to die if a customer quits the page before completing checkout.
//edit - scrub that, just made everything into one huge file and i've still got the problem, so i guess it's not include related.
$page = "login.php";
include ('./header.php');
if (isset ($_POST['submit1'])) {
include ('./stage1validate.php');
} else if (isset($_POST['submit2'])) {
include ('./stage2validate.php');
} else if (isset($_POST['submit3'])) {
include ('./stage3validate.php');
} else if (isset($_POST['submit4'])) {
include ('./stage4validate.php');
} else if (isset($_POST['submit5'])) {
include ('./stage5.php');
} else {
include ('./stage1view.php');
}
include ('./footer.php');
That's the main checkout.php file. I'm guessing that include's don't pass variables to each other or something... why not? Is there a way around it other than using sessions, which i really don't want to do as I want the variables to die if a customer quits the page before completing checkout.
//edit - scrub that, just made everything into one huge file and i've still got the problem, so i guess it's not include related.