RE: [PHP] IF Statements
| From: | Martin Towell | Date: | Mon, 14 Jan 2002 04:05:21 +0000 |
| Subject: | RE: [PHP] IF Statements | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-80419@lists.php.net to get a copy of this message | ||
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:necro@exclusionzone.com]
Sent: Monday, January 14, 2002 2:09 PM
To: php-general@lists.php.net
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: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net