Initial Commit

This commit is contained in:
ldy
2025-06-06 17:31:03 +08:00
parent 787a7b5741
commit 66cd489ea8
244 changed files with 13574 additions and 0 deletions

21
indexes/user/stays.js Normal file
View File

@@ -0,0 +1,21 @@
document.getElementById('searchForm').addEventListener('submit', function(event) {
event.preventDefault();
// Serialize the form data
var formData = new FormData(this);
// Perform the AJAX request to the server
fetch('search_hotels.php', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(hotels => {
// Process the returned hotel data
console.log(hotels); // For debugging purposes
// You will need to write code to display the hotels on the page
})
.catch(error => {
console.error('Error:', error);
});
});