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? 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']) : ''; 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
Archived
This topic is now archived and is closed to further replies.