View Single Post
Old December 17th, 2004, 02:01 PM
peg110 peg110 is offline
Authorized User
Join Date: Dec 2004
Location: Tunkhannock, PA, USA.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to peg110

PHP essentially defines variables on the fly. Basically, as you assign a value to the variable, it defines it first and then assignes the value.

If no value is assinged to the variable, it does not get defined, thus an error.
As kuehhc points out if you use the SUPER GLOBAL of $_GET you will likely avoid the error (unless you submit with an EMPTY value in the field.) This is likely because in your PHP.INI file your register_globals is probably set to OFF. (This is a Safer method, but harder on the coding).

If you don't want to use the SUPER GLOBALS, then you can set the register_globals to ON and keep your original code.

To avoid this error when submitting an EMPTY value you could read which should help.

Good Luck

Paul Gardner
Via Web @
Via IRC Client
room #PHP