[PHP] Sessions and Forms

2002-06-08 Thread Greg Macek
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,

Re: [PHP] Sessions and Forms

2002-06-08 Thread Jason Wong
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

Re: [PHP] Sessions and Forms

2002-06-08 Thread Greg Macek
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

Re: [PHP] Sessions and Forms

2002-06-08 Thread Nick Wilson
-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

Re: [PHP] Sessions and Forms

2002-06-08 Thread Nick Wilson
-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; -