mega77 Posted December 16, 2007 Share Posted December 16, 2007 When I set PHP error reporting to "E_ALL" I get the following result in some parts of my code : PHP Notice: Undefined index: name How can I change this code so that this error does not happen ? if($_GET["name"]=="rupert" || $_GET["name"]=="kim"){ // do something } Quote Link to comment Share on other sites More sharing options...
corbin Posted December 16, 2007 Share Posted December 16, 2007 if(isset($_GET['name']) && ($_GET['name'] == 'rupert' || $_GET['name'] == 'kim')) Quote Link to comment 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.