eldan88 Posted May 6, 2015 Share Posted May 6, 2015 Hey Guys, I have a simple if/else condition, and I keep getting an error "Undefined index: store" . I was wondering why its giving me thar error with the first if statment evalutes to true?? . Below is my code. Thanks! if(isset($_SESSION['store'])){$store_name = $_SESSION['store'];} else {$store_name = trim($_GET["store"],"/");} Link to comment https://forums.phpfreaks.com/topic/296109-why-is-else-condition-being-met-when-the-first-if-condition-is-true/ Share on other sites More sharing options...
eldan88 Posted May 6, 2015 Author Share Posted May 6, 2015 Nevermind. There was another file that that was included, using the same code which didn't have a $_GET that wasn't set Link to comment https://forums.phpfreaks.com/topic/296109-why-is-else-condition-being-met-when-the-first-if-condition-is-true/#findComment-1510927 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.