-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmb_update.php
45 lines (40 loc) · 1.64 KB
/
mb_update.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Update Booking</title>
<link rel="stylesheet" href="mb_update.css">
</head>
<body>
<div class="container">
<h1>Update Booking</h1>
<form id="updateForm">
<label for="travelSelect">Select Upcoming Travel:</label>
<select id="travelSelect" name="travelSelect">
<!-- Dynamically populate this dropdown with upcoming travels using JavaScript -->
<!-- Example: <option value="travel1">Travel 1 - Date</option> -->
</select>
<label for="newDate">New Travel Date:</label>
<input type="date" id="newDate" name="newDate" required>
<button id="btn" type="submit">Update Ticket</button>
</form>
<button id="btn" onclick="goBack()">Go Back</button>
</div>
<script>
// You can use JavaScript to dynamically populate the dropdown with upcoming travels
// Example:
const travelSelect = document.getElementById('travelSelect');
const upcomingTravels = ['Travel 1 - Date', 'Travel 2 - Date', 'Travel 3 - Date'];
upcomingTravels.forEach((travel, index) => {
const option = document.createElement('option');
option.value = `travel${index + 1}`;
option.text = travel;
travelSelect.appendChild(option);
});
function goBack() {
window.location.href = "new_booking_2.php"; // Replace with the actual path or URL for manage_booking2.php
}
</script>
</body>
</html>