<?php  
	session_start();
	// ini untuk menyambungkan ke file lain
	include 'konek.php';

	// $admin = mysqli_query($conn, "SELECT * FROM admin WHERE vehicle_id = '".$_GET['id']."' ");
	// $a = mysqli_fetch_object($admin);
?>



<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Fixit - Explore new horizons</title>
	<link rel="stylesheet" type="text/css" href="profil.css">
	<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
	

</head>

<body>
	<!-- header -->
	<header>
		<div class="container">
	<h1><a href="database.php">FIXIT</a></h1>
	<ul>
		<li><a href="buying.php">Home</a></li>
		<li><a href="logout.php">Logout</a></li>
	</ul>
	</div>
	</header>

	<!-- container -->

<div class="section">
	<div class="container">
		<h3>We Would Like To Know Your Experience ^_^</h3>
		<div class="box">
			<p><a href="customer-add-testdrive.php">Add Your Experience Here!</a></p><br>
			<table border="1" cellspacing="0" class="table">
				<thead>
					<tr class="tr">
						<th>No</th>
						<th>Customer Name</th>
						<th width="20px">Customer Email</th>
						<th>Name Of Vehicle</th>
						<th>Number Type of Vehicle</th>
						<th width="150px">Comments</th>
						<th>Location</th>
					</tr>
				</thead>
				<tbody>

					<?php
						// untuk memulai data dari angka 1
						$no = 1;
						// memilih data sesuai dari database
					 	$tayangan = mysqli_query($conn, "SELECT * FROM review ORDER BY review_id DESC");
					 	// while($row = mysqli_fetch_assoc($tayangan))
					 	while ($row = mysqli_fetch_array($tayangan)) {
					 	 ?>
					 	
					<tr>
						<td><?php echo $no++ ?></td>
						<td><?php echo $row['costumer_name'] ?></td>
						<td><?php echo $row['costumer_email'] ?></td>
						<td><?php echo $row['model'] ?></td>
						<td><?php echo $row['type_id'] ?></td>
						<td><?php echo $row['comment'] ?></td>
						<td><?php echo $row['location'] ?></td>
					</tr>
					<?php } ?>
				</tbody>
			</table>
		
		</div>
	</div>
</div>



	<!-- footer -->
<footer>
	<div class="container" >
		<small>Copyright & copy; 2023 - FIXIT.</small>
	</div>
</footer>

	
</body>
</html>