-
Notifications
You must be signed in to change notification settings - Fork 7
/
attendance.php
57 lines (41 loc) · 1.19 KB
/
attendance.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
<?php
require 'config/config.php';
include 'frontend/functions.php';
if (isset($_GET['exid'])) {
$exidr = $_GET['exidr'];
$selectquery = "SELECT * FROM exraids WHERE exidr='$exid'";
$selectresult = $conn->query($selectquery);
$row = $selectresult->fetch_array(MYSQLI_NUM);
$att = $row[0];
} else {
$exidr = $conn->real_escape_string($_POST['exidr']);
$att = $conn->real_escape_string($_POST['att']);
}
$sql = "SELECT * FROM exraids WHERE exid='$exidr'";
if(!mysqli_query($conn,$sql))
{
echo 'Not selected';
}
$sql = "SELECT * FROM users WHERE uname = '$att'";
if(!mysqli_query($conn,$sql))
{
echo 'Not selected';
}
else
{
echo '<center>See you there!</center><br>';
}
$sql1 = "INSERT INTO exraidatt (exid, uid) VALUES ('$exidr', '$att')";
if(!mysqli_query($conn,$sql1))
{
echo 'Not Inserted<br>';
}
else
{
if (isset($_GET['exid'])) {
echo "<meta http-equiv=\"refresh\" content=\"0;URL=./index.php?loc=$loc&zoom=19\">";
} else {
echo "<meta http-equiv=\"refresh\" content=\"0;URL=./exraids.php\">";
}
}
?>