I believe there may be something wrong with my PHP.ini as I can create cookies using the setcookie function but cannot access the cookie using the COOKIE function.
Please note: I have enabled cookies in my browser
I then have 2 very simple scripts in separate files
session_start(); $username="email@example.com"; setcookie('sb_cookie', $username, time()+10000;
session_start(); echo $_COOKIE['sb_cookie'];
I can see the cookie is created in my local folder, however I am getting an error
Notice: Undefined index: sb_cookie in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sandbbookingsystem\test\test.php on line 4
I have attached a copy of the created cookie, and the session section of my php.ini and would very much appreciate any help.