Jump to content

Error In Session : Undefined Index


Interista

Recommended Posts

Hello ,

I got error that said , I got this error only in the first set session , after that the error disappear .

So as example i send ( cart.php?add=302 ) in URL , And this is what I got :

Undefined index: cart_302 in C:\wamp\www\cart.php on line [i]9[/i]

 

 

I'm using session for store my cart info , this is my session create code :

 

 

if (isset($_GET['add'])){
$_SESSION['cart_'.$_GET['add']]+='1';
}

Link to comment
https://forums.phpfreaks.com/topic/269788-error-in-session-undefined-index/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.