Bluehost.com Web Hosting $6.95

RE: [PHP] RE: help with explode.....

This is a discussion on RE: [PHP] RE: help with explode..... within the PHP General forums, part of the PHP Programming Forums category; > -----Original Message----- > From: Joe Harman [mailto:joe@harmanmedia.com] > Sent: 25 July 2003 06:12 > > ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-25-2003
Mike Ford
 
Posts: n/a
Default RE: [PHP] RE: help with explode.....

> -----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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:18 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0