-
Notifications
You must be signed in to change notification settings - Fork 0
/
getdd_addbalance.php
109 lines (65 loc) · 3.17 KB
/
getdd_addbalance.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<form id="myform" method="post">
<?php
$userid = $_GET['userid'];
include("connection.php");
$sel = "select * from mmstores where uid='$userid'";
$rel=$con->query($sel);
if(mysqli_num_rows($rel)==0)
{
echo "<option value='nodata'>--No records to display--</option>";
}
else
{
while($data=mysqli_fetch_array($rel))
{
$name = $data['username'];
$balance = $data['Bal'];
echo "<div class='form-group'><label for='studentname' style='float: left;'>Student Name:</label>
<input type='text' name='name' value='".$name."' class='input-md round form-control' id='' readonly>
</div>
<div class='form-group'><label for='st_walletamt' style='float: left; '>Student Wallet Amount:</label>
<input type='text' name='st_walletamt' value='".$balance."' class='input-md round form-control' id='' readonly>
</div>
<div class='form-group'><label for='amt_update' style='float: left;'>Amount To Update:</label>
<input type='number' min='1' name='amt_update' class='input-md round form-control' id=''>
</div>
<input type='submit' name='btn_update' class='btn btn btn-mod btn-medium btn-round btn-full' value='Update'>
";
}
}
?>
</form>
<script src="js/jquery.validate.min.js"></script>
<script>
$(function()
{
$("#myform").validate({
rules:{
amt_update : "required",
amt_update: {
required:true,
number:true,
},
},
messages:{
amt_update:"<h5 style='color:black;'>Enter amount to update</h5>",
},
submitHandler: function(form){
form.submit();
}
});
});
</script>
</body>
</html>