-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearching_process.php
94 lines (85 loc) · 2.68 KB
/
searching_process.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
83
84
85
86
87
88
89
90
91
92
93
94
<html>
<head>
<title>Searching</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<style>
body{
background-color: #8FD7FF;
margin:0;
padding:0;
font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";
}
.nav{
background-color: #051183;
padding: 10px;
}
.nav a{
text-decoration:none;
font-size: 17px;
color: #fff;
padding:12px;
}
.nav a:hover{
background:#fff;
color:black;
transition:0.6s;
}
/*div.logo{
position: relative;
}*/
</style>
<body>
<table width="100%" height="339" border="0" align="center" bordercolor="#000000">
<tr bordercolor="#FFFFFF">
<!--<td width="80" rowspan="3" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><img src="baner.jpg" width="150" height="100"></td>-->
<td height="104" colspan="5" align="center" valign="top" bordercolor="#000000"><img src="baner.jpg" width="700" height="100"></td>
<!-- <td width="80" rowspan="3" align="center" bgcolor="#FFFFFF"><img src="baner.jpg" width="150" height="100"></td>-->
</tr>
<tr>
<td height="23" colspan="5" align="center" valign="top" bordercolor="#000000" bgcolor="#FFCC66"><div align="center"><font size="4" >
<div class = "nav">
|| <a href="home.php"> HOME</a>
|| <a href="car_list.php"> List of Car Rental</a>
|| <a href="register.php"> Register New Car</a>
|| <a href="delete_car.php"> Delete Car Rental</a>
|| <a href="edit_car.php"> Search Car Rental</a>
|| <a href="logout.php"> Log Out</a>
||</div>
</font></div></td>
</tr>
<tr>
<td height="202" colspan="5" align="center" valign="top" bordercolor="#000000" bgcolor="#FFCC66">
<p><font size="5" face="Verdana, Arial, Helvetica, sans-serif"><strong>Search Name</strong></font></p>
<p>
<?php
$keyword= $_POST['keyword'];
$connect=mysqli_connect('localhost','root','');
mysqli_select_db($connect, 'exercise 2');
$SQLcommand = "SELECT * FROM exercise WHERE name like '%$keyword%' order by name asc";
$result = mysqli_query($connect, $SQLcommand);
print "<table width=\"500\">";
print "<tr bgcolor=\"#DDDDDD\">";
print "<td>Car Plate Number</td>";
print "<td>Name</td>";
print "<td>Phone</td>";
print "<td>Date of register</td>";
print "</tr>";
while($row = mysqli_fetch_row($result))
{
print "<tr bgcolor=\"#EEEEEE\">";
print "<td> $row[0] </td>";
print "<td> $row[1] </td>";
print "<td> $row[2] </td>";
print "<td> $row[3] </td>";
print "</tr>";
}
print "</table>";
mysqli_close($connect);
?>
</p></td>
</tr>
</table>
<font color="#FFFFFF"></font>
</body>
</html>