-
Notifications
You must be signed in to change notification settings - Fork 2
/
otp2.php
46 lines (43 loc) · 1.09 KB
/
otp2.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
<?php
session_start();
include('config.php');
$car = $_POST['car'];
$otp2 = $_POST['otp2'];
$date = $_POST['datetimelocal'];
$qry = mysqli_query($con,"SELECT * FROM logtable WHERE otp2='$otp2' ");
$qry1 = mysqli_num_rows($qry);
if($qry1)
{
$row = mysqli_fetch_array($qry);
if($row['carno'] == $car)
{
$sql = mysqli_query($con,"UPDATE logtable SET totime='$date', status='Left' WHERE otp2='$otp2' ");
$lot = $row['lotname'];
$sql5 = mysqli_query($con,"UPDATE lot SET status='Leaving' WHERE lotname='$lot' ");
?>
<script type="text/javascript">
alert ("Proceed to Pay.");
window.location.href = "fee.php";
</script>
<?php
}
else
{
?>
<script type="text/javascript">
alert ("Invalid Credentials!");
window.location.href = "verify.php";
</script>
<?php
}
}
else
{
?>
<script type="text/javascript">
alert ("Invalid OTP!");
window.location.href = "verify.php";
</script>
<?php
}
?>