Я создаю корзину покупок с четырьмя кнопками: продолжить покупки, очистить корзину, обновить корзину и разместить заказ. У меня возникла проблема с сеансами: когда я нажимаю кнопку очистки корзины, отображается
undefined index cart
но корзина появляется из сеанса, и когда я нажимаю кнопку очистки корзины
it unsets the session of cart
так где я делаю это неправильно? может кто-нибудь помочь?
вот мой код
Shopping Cart
function del(pid){
if(confirm('Do you really mean to delete this item')){
document.form1.pid.value=pid;
document.form1.command.value='delete';
document.form1.submit();
}
}
function clear_cart(){
if(confirm('This will empty your shopping cart, continue?')){
document.form1.command.value='clear';
document.form1.submit();
}
}
function update_cart(){
document.form1.command.value='update';
document.form1.submit();
}
Your Shopping Cart
$
Подробнее здесь: https://stackoverflow.com/questions/155 ... art-in-php