Kevin Thorpe wrote:
Richard Ragon wrote:
Hows does the passing variables from page to page work?
Specifically, when you type in a URL like:
http://www.someurl.com/test.php?someVar=20
How does the next page get, and use the variable?
$_GET['someVar'] would be set to 20
$_POST[] holds values from a POSTed form
both are merged together in $_REQUEST[]
....unless you have an old version of php with register_globals turned
on in which case:
$someVar would be set to 20
...but I'd try not to use that anymore
Also, remember that GET, aka the way you have it (test.php?someVar=blah),
isn't the best way of doing things all the time. I find it great for
specifying the page you want to be on (ie: news.php?page=archives), and
this is how it should be used, but if you are working with form data, I
would suggest always using the POST method, as it 1. can handle more data,
and 2. hides the data from the user and makes it harder to spoof.
-Eric Kincl