ok . . . oe page one a book and its detailed are displayed then there is option to add the book to the cart with the following code:
display_button("show_cart.php?new=$isbn", "add-to-cart", "Add ".$book["title"]." To My Shopping Cart");
The book is added which takes us to "show_cartphp with $isbn passed as a parameter.
then this code is on the show_cart.php page
<?
include ('book_sc_fns.php');
// The shopping cart needs sessions, so start one
session_start();
if($new)
{
//new item selected
if(!session_is_registered("cart"))
{
$cart = array();
session_register("cart");
$items = 0;
session_register("items");
$total_price = "0.00";
session_register("total_price");
}
if($cart[$new])
$cart[$new]++;
else
$cart[$new] = 1;
$total_price = calculate_price($cart);
$items = calculate_items($cart);
}
My question is: "isn't $new replaced by the $isbn?
or does new still remain?
I guess $new still remains with holding the $isbn parameter.
But then the second if statment on the second page changes $new by incrementing it or changing it to 1.
What happened to the $isbn.
utterly confused.
Thanks