shage Posted October 16, 2007 Share Posted October 16, 2007 $sql = $sql . "WHERE siteid= '$site' "; $site is passed thru the variable get in url thank you Quote Link to comment https://forums.phpfreaks.com/topic/73406-solved-url-var/ Share on other sites More sharing options...
trq Posted October 16, 2007 Share Posted October 16, 2007 And your question is? Quote Link to comment https://forums.phpfreaks.com/topic/73406-solved-url-var/#findComment-370326 Share on other sites More sharing options...
shage Posted October 16, 2007 Author Share Posted October 16, 2007 it dont work, if i make it set to $site="3"; then do the mysql statement it works, but it wont pass the variable in the url to that Quote Link to comment https://forums.phpfreaks.com/topic/73406-solved-url-var/#findComment-370333 Share on other sites More sharing options...
trq Posted October 16, 2007 Share Posted October 16, 2007 So you need.... $sql = $sql . "WHERE siteid= '{$_GET['site']}' "; ? Quote Link to comment https://forums.phpfreaks.com/topic/73406-solved-url-var/#findComment-370336 Share on other sites More sharing options...
shage Posted October 16, 2007 Author Share Posted October 16, 2007 something like that but still no go thanks thou Quote Link to comment https://forums.phpfreaks.com/topic/73406-solved-url-var/#findComment-370339 Share on other sites More sharing options...
trq Posted October 16, 2007 Share Posted October 16, 2007 What does the url that goes to this page look like? Quote Link to comment https://forums.phpfreaks.com/topic/73406-solved-url-var/#findComment-370347 Share on other sites More sharing options...
shage Posted October 16, 2007 Author Share Posted October 16, 2007 blank if i declare the var itself and say make it google then it works, but wont work with passing it in url Quote Link to comment https://forums.phpfreaks.com/topic/73406-solved-url-var/#findComment-370350 Share on other sites More sharing options...
trq Posted October 16, 2007 Share Posted October 16, 2007 Do you actually want help? Can I please see what the url looks like? Quote Link to comment https://forums.phpfreaks.com/topic/73406-solved-url-var/#findComment-370352 Share on other sites More sharing options...
shage Posted October 16, 2007 Author Share Posted October 16, 2007 sorry misunderstood you my brain is worn out from this http://www.yahoo.com/?site=google Quote Link to comment https://forums.phpfreaks.com/topic/73406-solved-url-var/#findComment-370354 Share on other sites More sharing options...
trq Posted October 16, 2007 Share Posted October 16, 2007 Ok, to retrieve that variable you use $_GET['site']. If this fails to work, post your code and explain exactly what is happening and what you expect to happen. Quote Link to comment https://forums.phpfreaks.com/topic/73406-solved-url-var/#findComment-370355 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.