Restaurant table reservation HTML code
Here is an example of HTML code that could be used to create a simple table reservation form for a restaurant:
This form includes fields for the user's name, email, phone, desired date and time for the reservation, and the number of guests. The required attribute is used to indicate that these fields are required and must be filled out before the form can be submitted.
This form includes fields for the user's name, email, phone, desired date and time for the reservation, and the number of guests. The required attribute is used to indicate that these fields are required and must be filled out before the form can be submitted.
<form method="post" action="process_reservation.php">
<h2>Make a Table Reservation</h2>
<p>
<label for="name">Name:</label><br>
<input type="text" name="name" id="name" required>
</p>
<p>
<label for="email">Email:</label><br>
<input type="email" name="email" id="email" required>
</p>
<p>
<label for="phone">Phone:</label><br>
<input type="tel" name="phone" id="phone" required>
</p>
<p>
<label for="date">Date:</label><br>
<input type="date" name="date" id="date" required>
</p>
<p>
<label for="time">Time:</label><br>
<input type="time" name="time" id="time" required>
</p>
<p>
<label for="guests">Number of Guests:</label><br>
<input type="number" name="guests" id="guests" min="1" required>
</p>
<p>
<input type="submit" value="Submit">
</p>
</form>
The form uses the 'post' method and submits the data to the 'process_reservation.php' script, which would handle the processing of the form data and send a confirmation email or store the reservation in a database.
You can customize this code to suit the specific needs of your restaurant, such as adding additional form fields or changing the layout and styling of the form. It is also a good idea to validate the form data on the server side to ensure that it is valid and complete before processing the reservation.
Post a Comment