e33basketball Posted March 13, 2006 Share Posted March 13, 2006 Hi,I have a server running off my PC, mostly for testing... and it has PHP/MySQL installed. Everything works pretty well, except for some reason it's not recognizing any variables that I put in the URL.Example...url = www.site.com/index.php?check=1if($check == "1"){echo"one!";} else {echo"something else!";}no matter what i set check at... i still get "something else" ... or... if i where to say echo"$check"; ... nothings there....any ideas... thanks,Erik Link to comment https://forums.phpfreaks.com/topic/4810-wont-recognize-variables-in-the-url/ Share on other sites More sharing options...
naskoo Posted March 13, 2006 Share Posted March 13, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]if($check == "1"){echo"one!";} else {echo"something else!";} [/quote]$_GET['check'] == "1" !!! Link to comment https://forums.phpfreaks.com/topic/4810-wont-recognize-variables-in-the-url/#findComment-16910 Share on other sites More sharing options...
e33basketball Posted March 13, 2006 Author Share Posted March 13, 2006 oh cool, thanks... just curious... does this vary from type of PHP installation?... on a shared server that I have through a company... just using $check worked. Link to comment https://forums.phpfreaks.com/topic/4810-wont-recognize-variables-in-the-url/#findComment-16911 Share on other sites More sharing options...
wildteen88 Posted March 13, 2006 Share Posted March 13, 2006 How php treats sertain variables depends on one setting in the php.ini file which is the [b]regsiter_globals[/b] setting. Your shared hosting account has this set to [b]On[/b] (which isn't recommended any more as it can lead to security issues) and you local server has it turn [b]Off[/b] which is recommended. Link to comment https://forums.phpfreaks.com/topic/4810-wont-recognize-variables-in-the-url/#findComment-16922 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.