-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.php
54 lines (38 loc) · 1.31 KB
/
update.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
<?php
include 'conn.php';
if(isset($_POST['done'])){
$id = $_GET['id'];
$username = $_POST['username'];
$password = $_POST['password'];
$q = " update crudtable set id=$id, username='$username', password='$password' where id=$id ";
$query = mysqli_query($con,$q);
header('location:display.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="col-lg-6 m-auto">
<form method="post">
<br><br><div class="card">
<div class="card-header bg-dark">
<h1 class="text-white text-center"> Update Operation </h1>
</div><br>
<label> Username: </label>
<input type="text" name="username" class="form-control"> <br>
<label> Password: </label>
<input type="text" name="password" class="form-control"> <br>
<button class="btn btn-success" type="submit" name="done"> Submit </button><br>
</div>
</form>
</div>
</body>
</html>