Here is part of what I have.
$query = "select * from users where username='$username' and password='$password' ";
$result = mysql_query($query);
$num = mysql_num_rows($result);
$row = mysql_fetch_array($result);
$_SESSION['user_type'] = $row['user_type']; $user_type = $_SESSION['user_type'];
if ($num > 0 ) { $_SESSION['valid_user'] = $username; $valid_user = $_SESSION['valid_user']; }
Now if I tell it to print $valid_user, it shows the user logged in, but if I try to print $user_type I don't get anything in return. Any ideas as to what I am doing wrong? I have tried a separate query for the mysql_fetch_array, and that didn't seem to work either.
Mike
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php