-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathupdate_payment.php
38 lines (25 loc) · 1.08 KB
/
update_payment.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
<?php
require('db.php');
if (isset($_REQUEST['payment'])) {
$pay_id = mysqli_real_escape_string($conn, $_REQUEST['id']);
$amount = mysqli_real_escape_string($conn, $_REQUEST['amount']);
$update_query="update payment set pay_id='$pay_id',amount='$amount' where pay_id='".$_GET['id']."'";
$update_sql=mysqli_query($conn,$update_query);
$err="<div class='alert alert-success'><b>Payment Area Details updated</b></div>";
}
$con=mysqli_query($conn,"select * from payment where pay_id='".$_GET['id']."'");
$res=mysqli_fetch_assoc($con);
?>
<div class="container">
<form class="mt-3 form-group" method="post" action="">
<h3>UPDATE PAYMENT AREA</h3>
<?php
echo @$err;
?>
<label class="mt-3">PAYMENT AREA ID</label>
<input type="text" name="id" value="<?php echo @$res['pay_id'];?>" class="form-control">
<label class="mt-3">AMOUNT</label>
<input type="text" name="amount" value="<?php echo @$res['amount'];?>" class="form-control">
<button class="btn btn-dark mt-3" type="submit" name="payment">UPDATE</button>
</form>
</div>