I need to get the values out of a URL query string like this:
And assign them to variables inside index.php running on example.com, so that:
$name = xyz;
$number = 123;
How do I code this?
Thanks!!
I need to get the values out of a URL query string like this: And assign them to variables inside index.php running on example.com, so that:
How do I code this? Thanks!! |
|||
You'd need to setup a mod_rewrite rule first like this (untested)...
Then you could pull them out from |
|||
|
What you want to do is take a look at |
|||
|
You can parse it with the following, though it is ripe for injection unless you perform some validation/sanitization afterwards:
|
|||
|
?xyz=123
? This will form a key/value pair that you can access using$_GET
. – George Cummins Jul 14 '11 at 21:48