Osorene Posted July 5, 2007 Share Posted July 5, 2007 Please help with this problem, I've tried to find the solution over the Internet without any success. I got this notice: Notice: Undefined index: uid in c:\archivos de programa\easyphp1-8\www\public_html\prepa\index.php on line 79 line 79 is: if(!$_COOKIE['uid']) { What do I need to change? Quote Link to comment https://forums.phpfreaks.com/topic/58595-solved-problem-with-an-undefined-index-in/ Share on other sites More sharing options...
john010117 Posted July 5, 2007 Share Posted July 5, 2007 Put <?php error_reporting(E_ALL ^ E_NOTICE); ?> at the very top of the page. It will get rid of the error. Quote Link to comment https://forums.phpfreaks.com/topic/58595-solved-problem-with-an-undefined-index-in/#findComment-290628 Share on other sites More sharing options...
wcsoft Posted July 5, 2007 Share Posted July 5, 2007 Basically, that's just a notice that the index doesn't exist in the array. You could check using the isset() function, and then check if it's blank if it does exist: if (!isset($_COOKIE['uid']) || !$_COOKIE['uid']) Quote Link to comment https://forums.phpfreaks.com/topic/58595-solved-problem-with-an-undefined-index-in/#findComment-290636 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.