View Single Post
  #1  
Old 06-02-2002, 05:46 AM
TheRogue
 
Posts: n/a
Default php programming help needed :-)

atm im learning php from this tutorial; http://hotwired.lycos.com/webmonkey/...tw=programming

in the 2nd code listing it checks to see if the variable $id exists using if ($id), when i try and run this it errors sayin id is an undefined variable (it doesn't exist), the only way to fix the error is to define it ( eg $id = 0 ), which would lost the point in the whole if statement!

the if ($id) checks if the id variable has been set (which would of been from the command line eg test.php?id=1 )

anyone know whats wrong with this?
Reply With Quote