Reputation: 33
I'm trying to retrieve the cookie's value by simply calling its indexed position in the array, which is 1. However, I'm getting an error message saying 1 is an undefined offset? When I know for a fact it is in position 1. Am I missing something??
$query = "SELECT * FROM basketID" . $_COOKIE[1];
I've set the cookie like this
setcookie('visitUid',$uid,time()+60*60*24*7, '/');
$uid is a randomly generated number btw.
Upvotes: 0
Views: 160