RE: [PHP-DB] conditional page loading
| From: | Chad Day | Date: | Fri, 11 Aug 2000 20:28:13 +0000 |
| Subject: | RE: [PHP-DB] conditional page loading | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-1979@lists.php.net to get a copy of this message | ||
Make sure you output no content, and use a Header to jump them to whatever
page you want.
your query here
if ($num == 1) {
Header("Location: success.php");
} else {
Header("Location: forgotpw.php");
}
-----Original Message-----
From: umobiva@ostrichneck.org [mailto:umobiva@ostrichneck.org]
Sent: Friday, August 11, 2000 4:21 PM
To: php-db@lists.php.net
Subject: [PHP-DB] conditional page loading
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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net