Perad Posted June 3, 2007 Share Posted June 3, 2007 Notice: Undefined index: id in C:\web\htdocs\main\blog.php on line 139 I have this notice from the following line of code $Comments->viewComment($_GET['id']); I have an identical notice from this line $pageID = $_GET['addComment']; What would I need to remove this notice? Quote Link to comment https://forums.phpfreaks.com/topic/54090-notice-undefined-index-id-in-cwebhtdocsmainblogphp-on-line-139/ Share on other sites More sharing options...
Barand Posted June 3, 2007 Share Posted June 3, 2007 You need to check if they exist first eg $Comments = isset($_GET['id'] ? viewComment($_GET['id']) : ''; Quote Link to comment https://forums.phpfreaks.com/topic/54090-notice-undefined-index-id-in-cwebhtdocsmainblogphp-on-line-139/#findComment-267396 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.