-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate1.php
More file actions
78 lines (75 loc) · 1.92 KB
/
update1.php
File metadata and controls
78 lines (75 loc) · 1.92 KB
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
<html>
<head>
<title>update records in mysql database</title>
</head>
<body style="background:linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.5)),url(4k-wallpaper-automobile-automotive-1149137.jpg); background-repeat:no-repeat; background-size:cover;">
<body>
<style>
table{
border-collapse:collaspe;
color:#d96459;
font-family:monospace;
font-size:20px;
text-align: left;
margin: 3 auto;
display: table-cell;
vertical-align: middle;
height: 16%;
width: 85%;
display: table;
}
th {
background-color:#588c7e;
color:white;
}
button{
padding: 5px;
border-radius: 5px;
margin: 2px;
display: block;
width: 80px;
border: 2px;
background-color: white;
color: blue;
font-family: sans-serif;
text-align: center;
}
button{
border: .5px solid black;
background-color: orange;
color: white;
}
</style>
<?php
$con=mysqli_connect("localhost","root","","owner");
mysqli_select_db($con,'tutorial');
$sql="select * from owner";
$records=mysqli_query($con,$sql);
?>
<table>
<tr>
<th> Owner ID </th>
<th> Name </th>
<th> Address </th>
<th> Phone no </th>
<th> Sex </th>
<th> Vehicle no </th>
</tr>
<?php
while($row=mysqli_fetch_array($records))
{
echo "<tr><form action=update2.php method=post>";
echo "<td><input type=text name='ownid' value='".$row['ownid']."'</td>";
echo "<td><input type=text name='ownname' value='".$row['ownname']."'</td>";
echo "<td><input type=text name='ownadd' value='".$row['ownadd']."'</td>";
echo "<td><input type=text name='ownphno' value='".$row['ownphno']."'</td>";
echo "<td><input type=text name='sex' value='".$row['sex']."'</td>";
echo "<td><input type=text name='vehno' value='".$row['vehno']."'</td>";
echo "<input type=hidden name='ownid' value='".$row['ownid']."'>";
echo "<td><input type=submit value=update></td>";
echo "</form></tr>";
}
?>
<td><button><a href="admin.html">Back</a></button>
</body>
</html>