ted_chou12 Posted January 1, 2007 Share Posted January 1, 2007 if a url looks like this http://test.com/test.php?id=testi want the ?id=test part, ive tried php self, but it only gives me the page name with its extension but not the query as well, how do i get the query? ThanksTed Quote Link to comment https://forums.phpfreaks.com/topic/32501-solved-how-to-get-query-of-the-url/ Share on other sites More sharing options...
Jessica Posted January 2, 2007 Share Posted January 2, 2007 That is $_GET['id']; Quote Link to comment https://forums.phpfreaks.com/topic/32501-solved-how-to-get-query-of-the-url/#findComment-151064 Share on other sites More sharing options...
ted_chou12 Posted January 2, 2007 Author Share Posted January 2, 2007 nope, get would give me the test only, but I want the id part as well, how do i do that,Thanks Quote Link to comment https://forums.phpfreaks.com/topic/32501-solved-how-to-get-query-of-the-url/#findComment-151067 Share on other sites More sharing options...
trq Posted January 2, 2007 Share Posted January 2, 2007 You really need to learn how to use the manual.$_SERVER['QUERY_STRING'] Quote Link to comment https://forums.phpfreaks.com/topic/32501-solved-how-to-get-query-of-the-url/#findComment-151071 Share on other sites More sharing options...
Jessica Posted January 2, 2007 Share Posted January 2, 2007 I second Thorpe. Quote Link to comment https://forums.phpfreaks.com/topic/32501-solved-how-to-get-query-of-the-url/#findComment-151126 Share on other sites More sharing options...
PFMaBiSmAd Posted January 2, 2007 Share Posted January 2, 2007 I third that.A majority of the basic "how do I do that with xyz programming language" simply involves looking up information in a programming language reference manual.Waiting around for hours or days for an answer through a Forum for something that can be looked up through your own due diligence within a few tens of minutes, is not a very effective way to program. Quote Link to comment https://forums.phpfreaks.com/topic/32501-solved-how-to-get-query-of-the-url/#findComment-151167 Share on other sites More sharing options...
dbo Posted January 2, 2007 Share Posted January 2, 2007 Can we bring back RTFM? Quote Link to comment https://forums.phpfreaks.com/topic/32501-solved-how-to-get-query-of-the-url/#findComment-151174 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.