What is the best/recommended method of saving form data into session
variables? Currently only have to deal with regular text input,
checkboxes and radio buttons (no multiple selects for now). Any sample
code someone could throw up on the list? I've only recently begun
working with sessions,
On Saturday 08 June 2002 14:39, Greg Macek wrote:
What is the best/recommended method of saving form data into session
variables? Currently only have to deal with regular text input,
checkboxes and radio buttons (no multiple selects for now). Any sample
code someone could throw up on the
Ok, I'll have to try that on my next project. Unfortunately these forms were
written by another developer and there too many variables to rename to make an
array and not enough time on the project :-) But for next time.
I've seen many examples of assigning values to session variables w/o
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Greg Macek declared
Ok, I'll have to try that on my next project. Unfortunately these forms
were written by another developer and there too many variables to rename
How about something like this:
foreach($HTTP_POST_VARS as $key
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Nick Wilson declared
How about something like this:
foreach($HTTP_POST_VARS as $key = $val) {
$myFormData['$key']=$val;
}
Actually that may be a little redundent. You may well get away with:
$myFormData=$HTTP_POST_VARS;
-
5 matches
Mail list logo