[KLUG Programming] variable not being posted?

Adam Williams programming@kalamazoolinux.org
06 Aug 2003 22:35:11 -0400


> I decided to work a little bit on my library project.  Attempting to get
> it working on a RH9 machine I have run in to a snag.  For a url like
> http://localhost/librarydb/title.php?title_id=46
> the variable title_id is not being set.  Most configuration parameters
> are left unchanged from default.
> if ($title_id != 0) {
> 	do stuff here
> }
> else{ echo("no title_id"); }
> with this as the url, the echo command occurs.
> I'm confused.  Is php only allowing session variables to work and not
> posted variables?

Yep,  recent versions of PHP disable globals by default.  It is a good
idea.