-
Notifications
You must be signed in to change notification settings - Fork 0
/
display1.php
64 lines (50 loc) · 1.44 KB
/
display1.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
<?php
include 'connect2.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>Seach data and read data</title>
<style>
body {
background-color: whitesmoke;
}
input {
width: 40%;
height: 5%;
border: 1px;
border-radius: 05 px;
padding: 8px 15px 8px 15px;
margin: 10px 0px 15px 0px;
box-shadow: 1px 1px 2px 1px grey;
}
</style>
</head>
<body>
<center>
<form action="" method="POST" style="background-color:lightblue">
<input type="text" name="id" placeholder="Enter customer ID for search" /></br>
<input type="submit" name="search" value="Search Data" />
</form>
<?php
if(isset(($_POST['search'])))
{
$customerid = $_POST['id'];
$query = "SELECT * from customer_reg where id='$customerid'";
$query_run = mysqli_query($con,$query);
while($row = mysqli_fetch_array($query_run))
{
?>
<form action="" method="POST">
<input type="hidden" name="id" value="<?php echo $row['customerid'] ?>" /><br>
<input type="text" name="customername" value="<?php echo $row['customername'] ?>" /><br>
<input type="text" name="contactno" value="<?php echo $row['contactno'] ?>" /><br>
<input type="text" name="address" value="<?php echo $row['address'] ?>" /><br>
</form>
<?php
}
}
?>
</center>
</body>
</html>