Sun Dial Menu
The PHP for the Booking Form
Menu The PHP for the Booking Form
 

The PHP for the Booking Form

Looking back in my code repository I last worked on the Hall Booking form in February 2020. The file was BWVH/booking_hall.php (I can click on this locally)

I realise that I did a lot of work on this! It was before I really took off on developing this website into what you see now. I have developed a way of documenting code.

Top

Below is the top of the PHP file - I currrently have no intention of re-visiting it.

<?php
// This is the form for booking the village hall - due to limitation of the tsohosting this will be the "live" form and be run from tf/BWVH not bwvh.uk
// logic for sending email, logging event and display of response should be the same as tf_feedback.php

// define variables and set to empty values terms and conditions, Booking date and start time and the Nature of the event are required here
// $tandcErr
$nameErr = $emailErr = $addErr = $telErr = $dateErr = $timeErr = $natureErr = $genErr = "";
$name = $email = $submit = $tel = $stime = "";

if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["name"])) {
$nameErr = "Name is required";
} else {
$name = test_input($_POST["name"]);
// check if name only contains letters and whitespace
if (!preg_match("/^[a-zA-Z ]*$/",$name)) {
$nameErr = "Only letters and white space allowed";
}
}

if (empty($_POST["email"])) {
$emailErr = "Email is required";

Much of the code was found on various websites relating the processing and validation of forms.

Links

Link to PDF Disabled

If you require a copy please email tempusfugit.me.uk

External Links Disabled.

tempusfugit.me.uk is a non-commercial website. No payment or benefit is gained by the placement of links toother websites.

The External link is disabled to on this page, please visit other pages

Unlike most genealogical research websites tempusfugit.me.uk does not attempt to get you to "sign-up" when you click on one of their links.

This Wikipedia link is disabled.

The link on Wikipedia was to:

External Links Disabled.

tempusfugit.me.uk is a non-commercial website. No payment or benefit is gained by the placement of links to other websites.

The External link is disabled to on this page, please visit other pages

Top

External Links - references

Site design by Tempusfugit Web Design -