Hi all,
If i have the following script:
include ('functions.php');
session_start();
if (!empty($_POST['movie_id'])) {
$movie_id = $_POST['movie_id'];
// Starting a new cart session
if (!session_is_registered("cart")) {
$_SESSION['cart'] = array();
$_SESSION['items'] = 0;
$_SESSION['total_price'] = 0.00;
}
// Existing DVD in the cart + 1
if (!isset($_SESSION['cart'][$movie_id])) {
$_SESSION['cart'][$movie_id]++;
}
else {
$_SESSION['cart'][$movie_id] = 1;
}
$_SESSION['total_price'] = calculate_price($_SESSION['cart']);
$_SESSION['items'] = calculate_items ($_SESSION['cart']);
if ($_POST['ord_ship_cost']){
$_SESSION['ord_ship_cost'] = $_POST['ord_ship_cost'];
}
header ("Location: ./");
}
how can i add the variable $_SESSION['ship_cost'] to the cart session array? The vlaue is coming from a form.
Cheers,
micmac