View Single Post
Old 01-01-2005, 09:54 PM  
fusionx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Olongapo City, Philippines
Posts: 4,618
PHP coders - quick question

How do I do this:

IF $_GET['cat'] = 0 OR $_GET['cat'] IS NULL
myCat = 0
else
myCat = $_GET['cat']
END IF

Basically, if there is a request var called "cat" and it is zero, null, or if it doesn't even exist, set a var myCat to zero.
Otherwise, set the var to whatever it currently contains.

Thanks in advance!
fusionx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote