Techwarelabs Community

Techwarelabs Community (https://www.techwarelabs.com/community/index.php)
-   Software - Applications, Programming, and Games (https://www.techwarelabs.com/community/forumdisplay.php?f=13)
-   -   php programming help needed :-) (https://www.techwarelabs.com/community/showthread.php?t=1060)

TheRogue 06-02-2002 05:46 AM

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?

Uranium-235 06-02-2002 12:52 PM

Re: php programming help needed :-)
 
I guess you could try
Code:

if(isset($id))

TheRogue 06-03-2002 09:51 AM

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 :D

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

Uranium-235 06-03-2002 08:35 PM

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


All times are GMT -5. The time now is 03:42 AM.

Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.