I am new to webapps and PHP.
I am trying to get a cookie that it has not yet created, I mean, when I try to load a page that is looking for a non-existent cookie, I get an error message, I tried to get rid of this with an / catch attempt, but not success. This is the code I'm trying to do:
try{ $cookie = $_COOKIE['cookiefoo']; if($cookie){ //many stuffs here } else throw new Exception("there is not a cookie"); } catch(Exception $e){ }
How can I achieve this, any ideas, this would be appreciated.
php web-applications cookies
Felix
source share