<?php
session_start();
?>
<html>
<head>
<title>Login...</title>
<?php
include 'db_connect.php';
$result=" ";
if (isset($_POST['Submit']))
{
$a1484183_dr = $_POST['username'];
$xoraman453 = $_POST['password'];
$result = mysql_query("Select * From login where user_name='$username",$link);
$count=mysql_num_rows($result);
if ($count==0)
{
$msg="Username Does Not Exists...";
}
else
{
while($row = mysql_fetch_array($result, MYSQL_BOTH))
{
$usr_pwd=$row['user_password'];
$type=$row['user_type'];
if($usr_pwd!=$password )
{
$msg="Incorrect Password...";
}
else
{
if($type=='Customer')
{
$_SESSION['username']=$_POST['username'];
include "cust_data.php";
exit(0);
}
else if($type=='Teller')
{
$_SESSION['username']=$_POST['username'];
include "teller_data.php";
exit(0);
}
else
{
$_SESSION['username']="Administrator";
include "admin_data.php";
exit(0);
}
}
}
}
}
?>