logon wont stayed logged on!
Posted: Mon Oct 27, 2003 5:04 pm
heres my login(.php) page:
and as stated in the title, when I login it wil login all right, but then when i got to the next page, it forgets that i have logged on
...
so, any help?
-thx
Code: Select all
<?php
session_start();
$username = $_POSTї'username'];
$password = $_POSTї'password'];
if(!$_POST)
{
include 'html/loginform.html';
}
elseif((!$username) || (!$password))
{
echo "Please enter ALL of the information! <br />";
include 'html/loginform.html';
}
else
{
$qstr = "SELECT * from members where username = '$username' and password = '$password'";
$result = mysql_query($qstr);
if (mysql_num_rows($result))
{
$result = mysql_fetch_array($result);
$banned = $resultї"banned"];
$email = $resultї"email"];
$name = $resultї"name"];
$password = $resultї"password"];
$points = $resultї"points"];
$post = $resultї"post"];
$user_level = $resultї"user_level"];
$_SESSIONї'banned'] = $banned;
$_SESSIONї'email'] = $email;
$_SESSIONї'name'] = $name;
$_SESSIONї'password'] = $password;
$_SESSIONї'points'] = $points;
$_SESSIONї'post'] = $post;
$_SESSIONї'user_level'] = $user_level;
$_SESSIONї'username'] = $username;
echo "<br><font color=#008000><Center><b>**Successful Login**</b></Center></font>";
}
else
{
echo "<br><font color=#ff0000><Center><b>**Failed Login**</b></Center></font>";
}
}
?>so, any help?
-thx