Hi, I encountered a bug when using the 'view_order.php?oid=x' page (page #344 in the book), first time it loads, everything works fine and the $_SESSION['order_id'] is assigned the right value,
after I click on the 'Ship This Order' button the page reloads itself and the URL becomes just the 'view_order.php' so the script should use 'elseif (isset($_SESSION['order_id'])' to assign '$order_id = $_SESSION['order_id'],
but it doesn't, because for some reason the '($_SESSION['order_id'])' loses its value. I rechecked everything many times and there's no any mistake in my code here. And logic in the code
is clear and obviously right.
Meanwhile I found a workaround by modifying the <form action="view_order.php"...
to <form action=" to view_order.php?oid=' . $order_id . '"...,
so instead of the session the script uses $_GET['oid'] method and it works.
But anyway I'd like to know if there's something I could tweak to make the session work in this file.
P.S.
I didn't have any problems using sessions when I was redirecting the user from the checkout.php to the billing.php and so on.
The view_order.php doesn't jump from https to http or www. and the session_start(); function is always in the header.html
Thanks in advance.