conditional page loading
| From: | umobiva at ostrichneck dot org | Date: | Fri, 11 Aug 2000 20:21:16 +0000 |
| Subject: | conditional page loading | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-1978@lists.php.net to get a copy of this message | ||
Hello,
does anyone know how to make php load a web page based on a
condition or another page based on another condition.
For example, when a customer logs in, the login button calls
disclaimer.html page. This page connects to a mysql database to search a
customer/password cross reference table.
This should return 1 row or 0 rows.
I am grabbing the resulting number of rows like this:
$num = mysql_numrows($result)
then I have:
if ($num == 1) {
<web page to load if this is a valid user>
}
else {
<web page to load if this user is invalid>
}
I don't know what php uses to accomplish. I've tried looking through the
manual but nothing seems to suit this situation.
Does anyone know what commands I need to do in the if/else statement to
redirect to one of 2 pages?
TIA