cooldude832 Posted July 17, 2007 Share Posted July 17, 2007 I'm trying to create a dynamic search type criteria and i'm passing it via a GET var and then it has this : <?php if(ISSET($_GET['adcrt']) && $_GET['adcrt'] != ""){ echo $search[$_GET['adcrt']]; echo "<br/><br/>".$_GET['adcrt']."<br/><br/>"; } else{ echo $search['horse']; } ?> and it works great when my url is search.php or search.php?adcrt=anyadtype but when my url gets other search vars like search.php?search=yes&adtype=horse&state=AL&breed=Akhal+Tekes&gender=Male&adshow=2&adcrt=horse&sort=1&limit=0 in there it fails any ideas? Link to comment https://forums.phpfreaks.com/topic/60316-get-var-woes/ Share on other sites More sharing options...
teng84 Posted July 17, 2007 Share Posted July 17, 2007 dude y do you have to do this if(ISSET($_GET['adcrt']) && $_GET['adcrt'] != ""){ i think its the same as if(!empty($_GET['adcrt'])){ Link to comment https://forums.phpfreaks.com/topic/60316-get-var-woes/#findComment-300059 Share on other sites More sharing options...
cooldude832 Posted July 17, 2007 Author Share Posted July 17, 2007 i know i just write it that way still don't answer my question Link to comment https://forums.phpfreaks.com/topic/60316-get-var-woes/#findComment-300061 Share on other sites More sharing options...
teng84 Posted July 17, 2007 Share Posted July 17, 2007 even if code it that way its seems to be fine but try using the lowercase isset just a guess Link to comment https://forums.phpfreaks.com/topic/60316-get-var-woes/#findComment-300063 Share on other sites More sharing options...
cooldude832 Posted July 17, 2007 Author Share Posted July 17, 2007 no that if is workign because it will echo out the critera word if i say echo $_GET['adcrt'] but in the echo $search[$_GET['adcrt']]; it fails Link to comment https://forums.phpfreaks.com/topic/60316-get-var-woes/#findComment-300068 Share on other sites More sharing options...
teng84 Posted July 17, 2007 Share Posted July 17, 2007 try to debug maybe thats empty try $x=$_GET['adcrt']; $search[$x]; i know thats the same but just a guess again or try to hard code $search['your real value'] try if something will be echo that should always be done before you panic Link to comment https://forums.phpfreaks.com/topic/60316-get-var-woes/#findComment-300079 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.