-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit_customer
42 lines (35 loc) · 971 Bytes
/
edit_customer
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
<?php
//require "session_check.php";
$con = new mysqli("localhost","root","","shop_inventory");
$id = $_GET['id'];
$query = "SELECT * FROM customer WHERE id='$id'";
$result = $con->query($query);
$data = $result->fetch_object();
?>
<!DOCTYPE html>
<html>
<head>
<title>Edit Form</title>
</head>
<body>
<h3>Edit Form</h3>
<form action="update.php" method="post">
<input type="hidden" name="id" value="<?php echo $data->id?>">
<p>
<input type="text" name="customername" placeholder="Customer_name" value="<?php echo $data->customername;?>">
</p>
<p>
<input type="email" name="email" placeholder="Email" value="<?php echo $data->email;?>">
</p>
<p>
<input type="phoneno" name="phoneno" placeholder="PhoneNo" value="<?php echo $data->phoneno;?>">
</p>
<p>
<input type="text" name="address" placeholder="Address" value="<?php echo $data->address;?>">
</p>
<p>
<input type="submit" value="Update">
</p>
</form>
</body>
</html>