-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpin.php
65 lines (47 loc) · 2.11 KB
/
pin.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
<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>
.amt
{
display:none;
}
.btn {
border-radius:35px;
font-size: 20px;
}
</style>
</head>
<body>
<?php
$txt = 'cgi-bin/cardno.txt';
$fh = fopen($txt, 'r');
$cardno = fgets($fh);
fclose($fh);
$txt = 'cgi-bin/amount.txt';
$fh = fopen($txt, 'r');
$amount = fgets($fh);
fclose($fh);
$db = mysqli_connect("localhost","root","","project");
$res=mysqli_query($db,"select * from card where cardno = '$cardno'");
while($arr=mysqli_fetch_row($res))
echo "<h1> Hello $arr[1], Verify using pin.<br>Your Current Balance is: Rs. $arr[5]. <br> $amount will be debited.</h1>";
?>
<br>
<form action="done.php" method="POST">
<input type="integer" name="amt" class="amt" value="<?php echo "$amount"; ?>" >
<input type="integer" name="cardno" class="amt" value="<?php echo "$cardno"; ?>" >
<div class="col-xs-4 col-md-4">
<div class="form-group">
<input type="password" class="form-control" onKeyPress="if(this.value.length==4) return false"; name="pin" id="pin" placeholder="Enter 4-digit Pin" required />
</div>
</div><br>
<button type="submit" class="btn2 btn-info" style="vertical-align:middle"><span>Pay Now</span></button>
</form>
</body>
</html>