-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbidpcheck.php
51 lines (38 loc) · 1.38 KB
/
bidpcheck.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
38
39
40
41
42
43
44
45
46
47
48
49
<?php
session_start();
include_once('conn.php');
$un=$_POST["txt_uname"];
$pw=$_POST["txt_pass"];
$_SESSION['uname']=$_POST["txt_uname"];
$qry="SELECT username,password FROM user WHERE username='$un' AND password='$pw'";
$rs=mysql_query($qry);
$rnum=mysql_num_rows($rs);
if($rnum>0)
{
$qry1="SELECT usertype FROM user WHERE username='$un'";
$rs1=mysql_query($qry1);
$rnum1=mysql_num_rows($rs1);
while($row_sel=mysql_fetch_array($rs1))
{
$uid=$row_sel['usertype'];
}
$_SESSION['uid']=$uid;
if($uid==2)
{
header('location:browsepro2.php');
}
else if($uid==3)
{
header('location:browsepro3.php');
}
else
{
echo "You r not allowed!!";
}
}
else
{
// echo "invalid username or password";
header('location:bidlogininvalid.php');
}
?>