I have some script for general login:
PHP Code:
  function submitlogin($loguser,$logpass){
if(isset($loguser, $logpass))
        $myusername = mysql_real_escape_string(stripslashes($loguser));
        $mypassword = mysql_real_escape_string(stripslashes($logpass));
        $sql = sprintf("SELECT * FROM admin WHERE user='%s' AND password= ('%s')",$myusername,$mypassword);
        $result = mysql_query($sql) or die(_ERROR26.": ".mysql_error());

if(mysql_num_rows($result) > 0)
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
        <META http-equiv='refresh' content='2; url=index1.php'>
<title>Login success</title>
        <h1>You logged in !</h1>
header("location:login.php?msg=" urlencode("Wrong Username or Password. Please retry"));
header("location:login.php?msg=" urlencode("Please enter some username and password"));
After this i want to add another user, I want just for the new user directly access
after login. How should I do if i want this login can show the different page for each user?