if (action == "list")
{
  if (isset($clientcode))  // or just "if ($clientcode)" would work...
  {
    // extended listing here
  }
  else
  {
    // normal listing here
  }
}
else if ....

-----Original Message-----
From: Necro [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 2:09 PM
To: [EMAIL PROTECTED]
Subject: [PHP] IF Statements



I have a page for listing the contents of a table from my db.
Being client.php?action=list
As the action variable also allows for adding extra to the table, etc.

Once I use ?action=list I want to be able to click on a single record and
have it give me the extended info.
so client.php?action=list&clientcode=(the clients id in the db)

My problem is working out how to evaluate this new part. I have normal If
statements for the listing, adding, etc. But how can I get it to check if
clientcode is present. If clientcode is not present I want it to load the
list page as normal. But if the clientcode is present then it is to load
something else.

How do I structure my IF statement?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to