spikeon Posted March 5, 2008 Share Posted March 5, 2008 heres the url index.php?p=login&p2=startImage&sid=10&url=www.tehkennel.com $sid = $_GET[sid]; echo $sid; $sid == "" ... WHY!!!???!!! there aren't any errors in my code!!! Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/ Share on other sites More sharing options...
cooldude832 Posted March 5, 2008 Share Posted March 5, 2008 try print_r($_GET) and see what u get Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/#findComment-484282 Share on other sites More sharing options...
revraz Posted March 5, 2008 Share Posted March 5, 2008 $_GET['sid'] ? Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/#findComment-484283 Share on other sites More sharing options...
PFMaBiSmAd Posted March 5, 2008 Share Posted March 5, 2008 If that is all of your code, it is highly likely that register globals are on and the value is getting overwritten. Otherwise, post your whole code, because it could be anything in your code that is causing it. Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/#findComment-484292 Share on other sites More sharing options...
frijole Posted March 5, 2008 Share Posted March 5, 2008 did you try print_r? Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/#findComment-484300 Share on other sites More sharing options...
br3nn4n Posted March 5, 2008 Share Posted March 5, 2008 definitely try $_GET['sid'] Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/#findComment-484311 Share on other sites More sharing options...
PFMaBiSmAd Posted March 5, 2008 Share Posted March 5, 2008 FYI - $_GET[sid] will "function" (assuming there are no other problems in the code), but it will be about 20 times slower than the proper syntax $_GET['sid'] because with the proper syntax, php does not need to go through all the error handling code necessary to figure out that there is not a defined constant named sid and then try it as a quoted index named 'sid' For the quickest executing code, use proper syntax. Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/#findComment-484320 Share on other sites More sharing options...
spikeon Posted March 5, 2008 Author Share Posted March 5, 2008 OH!!!.... i looked it up... google really is a great tool. sid is also used as "Session Id" Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/#findComment-484343 Share on other sites More sharing options...
revraz Posted March 5, 2008 Share Posted March 5, 2008 So what does that mean, it works? Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/#findComment-484350 Share on other sites More sharing options...
spikeon Posted March 5, 2008 Author Share Posted March 5, 2008 with the '' it works. Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/#findComment-484394 Share on other sites More sharing options...
cooldude832 Posted March 6, 2008 Share Posted March 6, 2008 it means registered globals is on and $sid is already declared via session id Link to comment https://forums.phpfreaks.com/topic/94575-help-with-_get/#findComment-484617 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.