KarRental Booking failed! The Honda Civic is not available in the specified interval from 10.10.2024 to 10.25.2024. Try entering a different interval or search for another vehicle. Back to the vehicle side E
Write .php file that saves car booking and displays feedback.
There are 2 buttons, which are <Book it> <Select a date>. <Select a date> button gets an input from the user, start date and an end date. Book it button can be pressed only if the start date and ending date are chosen by the user. If successful, it books cars for specific dates, with bookings saved.
Booking should be in the .json file which contains all the bookings, and have the following information:
- Start Date.
- End Date.
- User Email.
- Car ID.
If the car is already booked for the selected period, a failure message should be displayed, along with a button to return to the homepage. In the booking.json file, if the Car ID and start date and end date matches, it fails
Use AJAX: Save bookings and display feedback without page refresh, using a custom modal (not alert).
Step by step
Solved in 2 steps with 6 images