Hi all, just a quick one...
I am currently using $query=$_SERVER['QUERY_STRING']; to read the query string of a URL which is fine for one variable in the query string, however i now need it to work on this eg URL
http://www.whatever.com/script.php?this=query1&query2
how can i do it so this=query1 and query2 are seperate? Do i need to use $_GET??
[SOLVED] $_SERVER['QUERY_STRING'] Question.
Moderator: General Moderators
-
Simon Angell
- Forum Commoner
- Posts: 45
- Joined: Fri Jan 24, 2003 12:14 am
Code: Select all
#http://www.whatever.com/script.php?this=query1&query2
echo $_GET['query1'];
#query 2 you might need some preg_replace/match .. if using it like that
#or
#http://www.whatever.com/script.php?this=query1&this2=query2
#than it would be
echo $_GET['this'];
echo $_GET['this2'];