Posts by Davi • 21 points
2 posts
-
0
votes0
answers36
viewsQ: Problem adding products to cart
$id= $_POST['id']; if(!isset($_SESSION['itens'])){ $_SESSION['itens'] = array(); } if(isset($_POST['id'])){ $id= $_POST['id']; if(!isset($_SESSION['itens'][$id])){ $_SESSION['itens'][$id] = 1;…
-
0
votes1
answer103
viewsQ: $_Session [ ' ' ] = array ( )
Where the data saved in Session is stored? One more question, why is this code so if(!isset($_SESSION['itens'][$id])){ $_SESSION['itens'][$id] = 1; }else{ $_SESSION['itens'][$id] =1; } I just copied…