You all know that when using forms, accessing the values via $_POST['name'] is kinda long to write. Register_globals may be turned off and it's also unsafe. Here is the idea: write the simpliest and easiest code that turns $_POST['name'] into $name, that works for scripts with any number if values in $_POST array. Clear?
I need painters, musicians and animators!
Deleted User
20th April, 2004 at 09:30:57 -
I didn't get it. A quote from php.net: "A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores."
How could $_POST values to be numbers, when solid number aren't valid variable name?
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G
Pete Nattress Cheesy Bits img src/uploads/sccheesegif
odd, maybe it doesn't like 'Get' instead of 'Post', thats what I changed it to while I was testing (Making forms is a pain)
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G
Let's parce the code to be sure.
For example, the $_POST has 2 items - "name" = 'Imp' and "pass" = 'qwerty'.
The $key variable stores the name of the array item, yeh? Then, if you do $key=$val, you set the $key variable to $val. So, the $key now stores 'Imp' string. Then, after the second loop, we assign new value for the same variable and now it stores 'qwerty'. This does not affect $name and $pass in any way. And I checked your example, it doesn't work as it should
I need painters, musicians and animators!
Deleted User
21st April, 2004 at 07:27:52 -
Imp of Hazard Games is right. So 32 including spaces.
Pete Nattress Cheesy Bits img src/uploads/sccheesegif