Jump to content

If Query String "id" is EMpty then id=0 (If else condition)


darubillah

Recommended Posts

hi,

 

i want a little help, i am making a site in which i also added a referral system

 

now I want to create an IF ELSE condition

 

for eg

 

<a href="index.php?id=<? echo $_GET["id"]; ?>">HOME</a>

 

now if some one refers to my page it will get id from QUERY STRING

 

but I want that if someone not refers him, or he come from googling or direct

 

then the value of QUERY STRING id will be " 0" ,,, id=0

 

can anyone tell me how to do this

 

thankyou best Regards

Shayan

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.