-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchecklog.php
37 lines (28 loc) · 868 Bytes
/
checklog.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
mysql_connect("localhost","root","") or die ("Error Occures");
mysql_select_db("furnitures_mkm") or die ("Error Occures");
error_reporting(0);
$user_name = $_POST["user_name"];
$Password = $_POST["password"];
$User_type=$_POST["user_type"];
$aID="";
$pss="";
$type="";
$tmp = "SELECT * FROM user_login WHERE user_name='$user_name' ";
$getData = mysql_query($tmp);
while($assData=mysql_fetch_assoc($getData)) {
$aID = $assData["user_name"];
$pss = $assData["password"];
$type= $assData["user_type"];
}
if($user_name==$aID && $Password==$pss && $type=='Manager' && $User_type=='Manager' ) {
include("managerhome.php");
}
else if($user_name==$aID && $Password==$pss && $type=='Administrator' && $User_type=='Administrator') {
include("adminhome.php");
}
else{
echo "Invalid Login";
include("userlogin.php");
}
?>