Posted by Geoff Berrow on 07/09/05 17:17
I noticed that Message-ID: <UyHze.9889$Jt.950@read1.cgocable.net> from
ChevyDriver contained the following:
>Here is the exaple from the book that I'm using.
>
I'm afraid your book is out of date. It assumes that register globals
is set to 'on' and the default these days is 'off'. What this means is
that all variables that you feed into a form are automatically
registered, that is the names of form elements will appear as variables
in the script. The method of the form element denotes the way the
variable is passed. 'get' means it is passed in the URL, 'post' means
they are sent invisibly.
The recommended way of dealing with this now is to assume register
globals is off. The values are still available in the GET and POST
arrays as I showed before but obviously I should have used GET rather
than POST.
The second problem is in the notice. Earlier versions of PHP had error
reporting set to a level where notices were suppressed. A notice is
PHPs way of saying 'I understand this but it's not strictly correct'
Mostly it will be ok but again it is good practice to code so as not to
get notices.
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
[Back to original message]
|