-
Notifications
You must be signed in to change notification settings - Fork 0
/
emp_sign_in.php
47 lines (32 loc) · 1.07 KB
/
emp_sign_in.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
<?php
require('connect.php');
if(isset($_POST['email']) && isset($_POST['password']))
{
$user= $_POST['email'];
$pass = $_POST['password'];
$query=" SELECT * FROM emp_sign_in WHERE email_id = '$user' and password = '$pass' ";
$result=mysqli_query($con,$query);
$row=mysqli_fetch_array($result,MYSQLI_ASSOC);
// $active = $row['active'];
$count = mysqli_num_rows($result);
$row=mysqli_fetch_assoc($result);
if($count == 1)
{
session_start();
$_SESSION['user'] = $user;
$query=" SELECT Is_verified FROM employer_reg WHERE comp_email = '$user' and comp_pswd = '$pass' ";
$result = mysqli_query($con, $query);
$value = mysqli_fetch_assoc($result);
if($value["Is_verified"]==0)
{
header("location:http://localhost/Reclutare/enter_otp_emp.php");
}
else
{
header("location:http://localhost/Reclutare/employer_panel.php");
}
}
else
echo("invalid userid or password");
}
?>