RE: [PHP] RE: help with explode.....
| From: | Ford, Mike [LSS] | Date: | Fri, 25 Jul 2003 09:30:50 +0000 |
| Subject: | RE: [PHP] RE: help with explode..... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-156813@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Joe Harman [mailto:joe@harmanmedia.com]
> Sent: 25 July 2003 06:12
>
> The name of the set of radio buttons is the QuestionID (so it's a
> number)... And the options are the AnswerID (they are also
> numbers)...
This is technically invalid for PHP -- all your form field names should conform to the rules for PHP
variable names, so it would be better to use name="q1", name="q2", etc.
The reason is that if you were to turn register_globals on, PHP would try to create global variables
using your field names, and $1, $2, etc. are not valid variables. Whilst PHP *may* get this right
if you have register_globals turned off, there is no absolute guarantee that $_POST['1']
etc. will be handled correctly.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211