-
Notifications
You must be signed in to change notification settings - Fork 1
/
top_up.php
50 lines (47 loc) · 2.18 KB
/
top_up.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
<?php include("header.inc.php"); ?>
</div>
<section class="panel panel-default" style="border:none;">
<div class="row">
<div class="col-md-12" style="margin-bottom:20px;">
<div class="row">
<div class="col-md-12">
<?php
$matric = $_GET['matric'];
$query90 = "SELECT * FROM wallet WHERE matric = '$matric'";
$result90 = mysql_query($query90)
or die ("Couldn't execute query90.");
while ($row90 = mysql_fetch_array($result90,MYSQL_ASSOC))
{
if (isset($_POST['wallet'])) {
$matric = $_GET['matric'];
$a = $row90['amount'];
$b = $_POST['amount'];
$amount = $a + $b ;
$query56 = "UPDATE wallet SET amount = '$amount' WHERE matric = '$matric'";
$result56 = mysql_query($query56)
or die ("Couldn't execute query56.");
// header("Location: top_wallet.php");
echo("<script>location.href = 'top_wallet.php';</script>");
// redirect_to("top_wallet.php");
}
}
?>
<form action="top_up.php?matric=<?php echo $_GET['matric']; ?>" method="post" class="form-horizontal form-label-left input_mask">
<div class="col-md-12 col-sm-12 col-xs-12 form-group has-feedback">
<input type="number" class="form-control has-feedback-left" name="amount" id="inputSuccess2" placeholder="Amount">
<span class="fa fa-credit-card form-control-feedback left" aria-hidden="true"></span>
</div>
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="col-md-6 col-sm-6 col-xs-12">
<a href="top_wallet.php" class="btn btn-default">Cancel</a>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<button type="submit" name="wallet" class="btn btn-info"> <i class="fa fa-arrow-up"></i> Top</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<?php include("footer.inc.php"); ?>