having this url:
h**p://domain.com/file.php?message=this%20value ...
how can i retrive JUST the variable/value? - i realize $_SERVER['REQUEST_URI'] will get me the entire string after the .com/, but i need to get the variable's value (what's after the =) into a javascript...
i really appreciate the help,
GN
retrieving the variable/value from the url HELP
Moderator: General Moderators
-
glennn.php
- Forum Commoner
- Posts: 41
- Joined: Sat Jul 08, 2006 12:26 pm
-
nowaydown1
- Forum Contributor
- Posts: 169
- Joined: Sun Apr 27, 2008 1:22 am
Re: retrieving the variable/value from the url HELP
You want:
Which will give you the value of the 'message' parameter in your query string. Then you can just have PHP write out a little js if you need to pass it to javascript.
Code: Select all
$queryStringVar = $_GET["message"];
-
glennn.php
- Forum Commoner
- Posts: 41
- Joined: Sat Jul 08, 2006 12:26 pm
Re: retrieving the variable/value from the url HELP
awesome - actually, i knew the first part (i'm just an unthinking moron) but you helped me with the second issue - right, i can just have PHP echo a js function. cool.
awesome, again. thanks
awesome, again. thanks