Jump to content

Why is else condition being met when the first if condition is true?


eldan88

Recommended Posts

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"],"/");
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.