Techware Labs Header

Forums have moved

See this announcement for more details, or just go directly there.

  #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
  #2  
Old 06-02-2002, 12:52 PM
Uranium-235's Avatar
Uranium-235 Uranium-235 is offline
Administrator
 
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
Send a message via ICQ to Uranium-235 Send a message via AIM to Uranium-235
Default Re: php programming help needed :-)

I guess you could try
Code:
if(isset($id))
__________________
PHP...It kicks ASP
Reply With Quote
  #3  
Old 06-03-2002, 09:51 AM
TheRogue
 
Posts: n/a
Default Re: php programming help needed :-)

i got that off a m8 in irc, but thx neway

i'd like to point out that PHP is an excellent web scripting language, ive been using it for 2 days now and i love it

i'd recommend it to anyone, especially if your used to C/++ syntax (eg perl, java) and also used to ASP

its easy to learn, fast to use, put it with MySQL and its amazing ;D
Reply With Quote
  #4  
Old 06-03-2002, 08:35 PM
Uranium-235's Avatar
Uranium-235 Uranium-235 is offline
Administrator
 
Join Date: Nov 2001
Location: Mansfield, TX
Posts: 2,469
Send a message via ICQ to Uranium-235 Send a message via AIM to Uranium-235
Default Re: php programming help needed :-)

yes. look at the first line in my sig. Now look at the loction of the random image of my sig. It's a PHP script that does a binary read of a image under the folder name of &catagorey and prints it to the browser.

Source code: http://dynamic2.gamespy.com/~extreme...howsource=true
__________________
PHP...It kicks ASP
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:53 AM. Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum style by ForumMonkeys.