Book a wet test at Solihull Hot Tubs

Name :
Address :
Address :
County:
Postcode/Zip:
Country:
Telephone number(s):
E-mail:
Wet test time:
Comments:






'; // czy wysylac wiadomosc czy form wyswietlac if (!$_POST['send']) { // czyli form echo $formularz; } else { // czyli ze sprawdzic --> wyslac / zwrocic // funkcja sprawdzajaca czy wymagane atrybuty nie sa puste function CheckVariables($variables) { // argumenty dostaje jako tablice for ($a = 0; $a < count($variables); $a++) { if (empty($variables[$a])) { return 0; } } return 1; } // daje do tablicy zmienne ktore chce sprawdzic $variables = array($_POST['Name'], $_POST['Email'], $_POST['Comments']); if (CheckVariables($variables)) { echo "Thank you. We will contact you soon."; if (($_SERVER['HTTP_REFERER'] == 'http://www.a5spas.co.uk/contactus.html') || ($_SERVER['HTTP_REFERER'] == 'http://a5spas.co.uk/contactus.html')) { while( list($klucz, $wartosc) = each($_POST) ) { $msg .= "$klucz: $wartosc\n"; } // $emailaddress = "kubaurbanczyk@gmail.com"; $emailaddress = "leads@a5spas.co.uk"; $emailsubject = "Contact us"; mail($emailaddress, $emailsubject, $msg); } } else { echo "Please fill in all fields

"; echo $formularz; } } ?>