-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4wheelercust.php
More file actions
59 lines (51 loc) · 1.87 KB
/
4wheelercust.php
File metadata and controls
59 lines (51 loc) · 1.87 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="2wc.css">
</head>
<body>
<h1>4 Wheeler Details</h1>
<form class="form" action="#" method="post" enctype="multipart/form-data">
<input class="textbox" type="text" name="vehiclename" placeholder="Enter the vehicle name">
<input class="btn" type="submit" name="search" value="Search">
</form>
<table>
<thead>
<tr>
<th>Vehicle Name</th>
<th>Vehicle Type</th>
<th>Vehicle Cost</th>
<th>Vehicle Model</th>
<th>Manufacture date</th>
<th>Image</th>
</tr>
</thead>
<?php
require_once ('connection.php');
if(isset($_POST['search']))
{
$Vehiclename = $_POST['vehiclename'];
$query = "SELECT * FROM fourwheeler where vehiclename='$Vehiclename' ";
$results= mysqli_query($con,$query);
while($row = mysqli_fetch_array($results))
{
?>
<tr>
<td><?php echo $row['vehiclename']; ?></td>
<td><?php echo $row['type']; ?></td>
<td><?php echo $row['cost']; ?></td>
<td><?php echo $row['model']; ?></td>
<td><?php echo $row['manufacturedate']; ?></td>
<td><?php echo '<img src="data:image/jpeg;base64,'.base64_encode($row['image'] ).'" height="200" width="200"/>'; ?></td>
</tr>
<?php
}
}
?>
</table>
<p>To buy this vehicle please click on the buy now button </p>
<a href="buynow.php"><button class="btn" type="submit" name="button">Buy now</button></a>
</body>
</html>