-
Notifications
You must be signed in to change notification settings - Fork 14
/
check.php
70 lines (55 loc) · 2.7 KB
/
check.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<?php
$job_id= $_GET['job_id'];
$s_mail= $_GET['s_mail'];
$servername="localhost";
$username="root";
$password="password";
$dbname="project";
$conn = new mysqli($servername,$username,$password,$dbname);
if (!$conn) {
die('Could not connect: ' . mysqli_error($conn));
}
$sql1="SELECT * FROM students WHERE email = '".$s_mail."'";
$result1 = $conn->query($sql1);
$row1 = $result1->fetch_assoc();
$sql2="SELECT * FROM vacancy WHERE job_id = '".$job_id."'";
$result2 = $conn->query($sql2);
$row2 = $result2->fetch_assoc();
//Pending!
//echo $row1['degree']." ".$row2['degree_e']." ".$row1['cpi']." ".$row2['cpi_e'] ." ". $row1['year']." ".$row2['year_e'] ." ". $row1['12p']." ".$row2['12p_e'] ." ". $row1['10p']." ".$row2['10p_e'] ;
if($row1['degree']==$row2['degree_e'])
echo "Degree required ".$row2['degree_e']." <img src=\"Images/tick.png\" height=\"20\" width=\"20\" ><BR>";
else
echo "Degree required ".$row2['degree_e']." <img src=\"Images/cross.png\" height=\"20\" width=\"20\" ><BR>";
if($row1['cpi']>=$row2['cpi_e'])
echo "CPI required greater than ".$row2['cpi_e']." <img src=\"Images/tick.png\" height=\"20\" width=\"20\" ><BR>";
else
echo "CPI required greater than ".$row2['cpi_e']." <img src=\"Images/cross.png\" height=\"20\" width=\"20\" ><BR>";
if($row1['year']>=$row2['year_e'])
echo "Year of passing required greater than ".$row2['year_e']." <img src=\"Images/tick.png\" height=\"20\" width=\"20\" ><BR>";
else
echo "Year of passing required greater than ".$row2['year_e']." <img src=\"Images/cross.png\" height=\"20\" width=\"20\" ><BR>";
if($row1['12p']>=$row2['12p_e'])
echo "12th %age required greater than ".$row2['12p_e']." <img src=\"Images/tick.png\" height=\"20\" width=\"20\" ><BR>";
else
echo "12th %age required greater than ".$row2['12p_e']." <img src=\"Images/cross.png\" height=\"20\" width=\"20\" ><BR>";
if($row1['10p']>=$row2['10p_e'])
echo "10th %age required greater than ".$row2['10p_e']." <img src=\"Images/tick.png\" height=\"20\" width=\"20\" ><BR>";
else
echo "10th %age required greater than ".$row2['10p_e']." <img src=\"Images/cross.png\" height=\"20\" width=\"20\" ><BR>";
if($row1['degree']==$row2['degree_e'] && $row1['cpi']>=$row2['cpi_e'] && $row1['year']>=$row2['year_e'] && $row1['12p']>=$row2['12p_e'] && $row1['10p']>=$row2['10p_e'] ){
echo "<H3>You're eligible!</H3><BR>";
echo "<input type=\"button\" value=\"Apply\" onclick=\"apply_fun('".$job_id."','".$s_mail."','".$row2['company_name']."',this)\">";
}else{
echo "<H3>You're not eligible!</H3><BR>";
}
?>
</body>
<footer>
</footer>
</html>