rainprop Posted March 14, 2010 Share Posted March 14, 2010 this is my code..can someone tell me wats wrong in that line?? if ($_GET["op"] == "login") { if (!$_POST["username"] || !$_POST["password"]) { die("You need to provide a username and password."); } Link to comment https://forums.phpfreaks.com/topic/195207-notice-undefined-index-op-how-to-solve/ Share on other sites More sharing options...
wildteen88 Posted March 14, 2010 Share Posted March 14, 2010 Use isset before using $_GET['op'] eg if (isset($_GET['op']) && $_GET["op"] == "login") { if (!$_POST["username"] || !$_POST["password"]) { die("You need to provide a username and password."); } Link to comment https://forums.phpfreaks.com/topic/195207-notice-undefined-index-op-how-to-solve/#findComment-1025976 Share on other sites More sharing options...
rainprop Posted March 14, 2010 Author Share Posted March 14, 2010 ok thanks alot..that sure helped.. Link to comment https://forums.phpfreaks.com/topic/195207-notice-undefined-index-op-how-to-solve/#findComment-1025977 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.