-
Notifications
You must be signed in to change notification settings - Fork 0
/
destinasi.php
33 lines (29 loc) · 1.38 KB
/
destinasi.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
<?php
include './config/databaseConnection.php';
// Menampilkan daftar destinasi wisata
$sql = "SELECT * FROM destination";
$result = $connect->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
echo "<h3>" . $row['name'] . "</h3>";
echo "<p>" . $row['description'] . "</p>";
echo "<p>Harga Tiket: " . $row['price'] . "</p>";
// Form Pemesanan Tiket
echo "<form method='POST' action='pesan.php'>";
echo "<input type='hidden' name='id' value='" . $row['id'] . "'>";
echo "<input type='text' name='visitor_name' placeholder='Visitor Name' required><br>";
echo "<input type='date' name='arrival_date' placeholder='Visitor Name' required><br>";
echo "<input type='number' name='ticket_total' placeholder='Ticket Total' required><br>";
echo "<button type='submit'>Pesan Tiket</button>";
echo "</form>";
// Form Ulasan Pengguna
echo "<form method='POST' action='ulasan.php'>";
echo "<input type='hidden' name='id' value='" . $row['id'] . "'>";
echo "<input type='text' name='visitor_name' placeholder='Visitor Name' required><br>";
echo "<textarea name='review' placeholder='Review' required></textarea><br>";
echo "<button type='submit'>Kirim Ulasan</button>";
echo "</form>";
}
} else {
echo "Tidak ada destinasi wisata.";
}