-
Notifications
You must be signed in to change notification settings - Fork 1
/
done.php
67 lines (42 loc) · 1.37 KB
/
done.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
<html>
<head>
<title> Payment Gateway </title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="style.css" rel="stylesheet">
<style>
.btn {
border-radius:35px;
font-size: 20px;
}
</style>
</head>
<body>
<?php
$cardno=$_POST['cardno'];
$amount=$_POST['amt'];
$pin=$_POST['pin'];
$db = mysqli_connect("localhost","root","","project");
$qr = "update card set balance = balance - $amount where cardno = '$cardno' and pin = '$pin'";
mysqli_query($db,$qr);
$res=mysqli_query($db,"select * from card where cardno = '$cardno' and pin='$pin'");
if($arr=mysqli_fetch_row($res))
{
echo "<h1> Thank you! Successfully Paid $amount.<br>Your Updated Balance is: Rs. $arr[5] </h1>";
echo '<form action="index.html">
<br><br><button type="submit" class="btn2 btn-info" style="vertical-align:middle"><span>Done</span></button>
</form>';
}
else
{
echo "<h1>Face ID does not match.</h1>";
echo '<form action="pin.php">
<br><br>
<button type="submit" class="btn2 btn-info" style="vertical-align:middle"><span>Pay Using PIN</span></button>
</form>';
}
?>
</body>
</html>