I have no way of doing that because I really don't know. Weeks ago, he was receiving orders and now he can't suddenly. I found some stuff about deprecated tags, changed out session_register for $_SESSION['cart]' and session_unregister with unset($_SESSION['cart']) and that removed the fatal errors. NOW all that happens is that the cart is empty. NO errors, but nothing is being added to the cart.
this is my most recent, fatal error free code:
<?
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
require "./includes/cart_class.php";
require_once "./includes/functions.inc.php";
session_start();
//unset($_SESSION['cart'];
//exit();
$product_id = $_REQUEST["pid"];
$pcid = $_REQUEST['pcid'];
$product_name = $_REQUEST['product_name'];
$price = $_REQUEST['price'];
$qty = $_REQUEST['qty'];
$att_id = $_REQUEST['att_id'];
$att_value_id = $_REQUEST['att_value_id'];
$pop = $_REQUEST["pop"]; /// if value =1 then comes from popup product details page.
$page_type = $_REQUEST['page_type']; /// if value =1 then comes from category pages.
$stoolH = $_REQUEST['stoolheight'];
$arr_att = array($att_id, $att_value_id);
$sql="select product_weight from yp_product where product_id='$product_id'";
$pweight=getSingleResult($sql);
if($_SESSION['cart']!=""){
$cart=$_SESSION['cart'];
}
if($qty==''){
if($min_qty!=""){
$qty=$min_qty;
}else{
$qty=1;
}
}
if($qty==0){
$_SESSION['sess_msg']= "QUANTITY CANNOT BE LESS THAN 1";
header("Location: product_detail.php?pid=$pid&pcid=$pcid");
exit();
}
if(!$_SESSION['cart']){
$cart = new cart();
$_SESSION['cart'];
}
$item_object = new product($product_id , $product_name , $price, $arr_att, $qty , $pweight, $stoolH);
$cart->addToCart($item_object , $product_id , $product_name , $price , $arr_att , $qty , $stoolH , $pweight);
$back="modify_cart_frm.php";
header("Location: ".$back);
exit;
?>