Hi!
I'm still a bit new to all of this, so I will ask my question in this forum. :queasy:
I would like to have users login, and based on this login, if they're one type of customer I want to take them to pagex.php, if they're another, I want to take them to pagey.php.
Since I don't know what type of customer they are until they've logged in, I can't redirect with the header function, so I thought maybe I could do it by grabbing their login info, and seeing if they're type x, then go to pagex.php if they're type y, go to pagey.php:
function check_class() {
$user = $db->get_row("SELECT class FROM customers WHERE username={$_POST['username']} and {$_POST['password']}");
if ($user == 0) {
send to xxx page
} elseif ($user == 1) {
send to xxx
} else {
echo "You are not yet registered.";
}
}
Is there a more practical way to do this? Am I perhaps trying to reinvent the wheel here?
Thanks in advance for any help!
eCat