php ?
Out of context: Reply #4
- Started
- Last post
- 5 Responses
- enobrev0
look for 'superglobals' in the manual. Basically when you pass variables to a script via a get or post, they are put into 3 arrays.
'gets' are put into the $_GET array (stuff passed via url)
'posts' are put into the $_POST array (stuff passed fro m a form with method 'post')
and all of hte above are put into the $_REQUEST array
it's generally best to use $_GET or $_POST as it helps the 'reader' of the script to know exactly where the vars are supposed to come from.
That loop that was given earlier loops through the $_REQUEST array (which has both) and creates local variables for everything passed into the script, so you don't have to use the superglobals throughout the script.
Although, as I've said in the past, even though it adds a few bytes to your scripts, the script is far easier to read and debug if you use the $_GET and $_POST arrays throughout instead of generate locals.
At the end of the day, it's your call..
good luck!