-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbank_edit.php
82 lines (65 loc) · 2.29 KB
/
bank_edit.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
<?php
require_once("header.php");
require_once("sidebar.php");?>
<?php
$d=$_GET['ram'];
$bank_da = $conn->query("SELECT * FROM `bank` WHERE bankID=$d");
$result=$bank_da->fetch_assoc();
if(isset($_POST['bank_name'])) {
$ban=$_POST['bank_name'];
$status=$_POST['status'];
$conn->query("UPDATE `bank` SET `bank_name` = '$ban',status='$status' WHERE `bank`.`bankID` = $d");
// header("location:bank.php"); ?>
<script>
window.location.href=("bank.php");
</script>
<?php } ?>
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Update Bank</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active">Update Bank </li>
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h1 class="card-title">Add Bank</h1>
</div>
<!-- /.card-header -->
<div class="card-body">
<form action="" method="post">
<label for="bank_name">Bank Name:</label>
<input type="text"name="bank_name"class="form-control"placeholder="Enter bank name" value="<?php echo $result['bank_name'] ?>">
<label for="name">Status:</label>
<select name="status"class="form-control">
<option value="active"<?php if ($result['status']==='active'){echo "checked"; }?>><span>Active</span></option>
<option value="inactive"<?php if ($result['status']==='inactive'){echo "checked"; }?>><span>Inactive</span></option>
</select>
<br>
<td colspan="6">
<input type="Submit" value="Submit"class="btn btn-outline-info btn btn-block">
</td>
<br>
</form>
<!--table -->
</table>
</div>
</div>
<!-- /.card -->
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<?php require("footer.php"); ?>