M
MASSEY
- Original Poster
- #1
The head section is below
<?php
// This function checks for empty fields, email address format and strips out dodgy characters
function VerifyForm(&$values, &$errors)
{
if($values['gender'] != ''){die();}
$values['name'] = ereg_replace('[^A-Za-z0-9 ,.]', '', $values['name']);
$values['requests'] = ereg_replace('[^A-Za-z0-9 ,.?]', '', $values['requests']);
if(empty($values['name']))
$errors['name'] = 'Please enter your name';
if(preg_match( "/[^0-9 -+()]/", $values['telephone']))
$errors['telephone'] = 'Please check your telephone number';
if(empty($values['telephone']))
$errors['telephone'] = 'Please enter a telephone number';
if (!preg_match("/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i", $values['email']) )
$errors['email'] = 'Please enter a valid Email address';
if($values['sums']<>9)
$errors['sums'] = 'Try again';
return (count($errors) == 0);
}
// This function displays the contact form.
// After the 'send' button has been pressed, errors are checked and the fields that need correcting indicated.
function DisplayForm($values, $errors)
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta name="description" content="Electricians in Birmingham with over 20 years experience. For a proper legally certified installation contact our Birmingham Electricians on 0121 429 1586"/>
<meta name="keywords" content="Birmingham Electrician,Electrician Birmingham,Electrical Contractors Birmingham,Birmingham Electrical Contractors,Electrician,Birmingham,Electrician Solihull"/>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<title>Birmingham Electrician | Electrician in Birmingham | Full and Partial House Rewires</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.74.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.slideshow').cycle({
fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
});
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<?php
// This function checks for empty fields, email address format and strips out dodgy characters
function VerifyForm(&$values, &$errors)
{
if($values['gender'] != ''){die();}
$values['name'] = ereg_replace('[^A-Za-z0-9 ,.]', '', $values['name']);
$values['requests'] = ereg_replace('[^A-Za-z0-9 ,.?]', '', $values['requests']);
if(empty($values['name']))
$errors['name'] = 'Please enter your name';
if(preg_match( "/[^0-9 -+()]/", $values['telephone']))
$errors['telephone'] = 'Please check your telephone number';
if(empty($values['telephone']))
$errors['telephone'] = 'Please enter a telephone number';
if (!preg_match("/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i", $values['email']) )
$errors['email'] = 'Please enter a valid Email address';
if($values['sums']<>9)
$errors['sums'] = 'Try again';
return (count($errors) == 0);
}
// This function displays the contact form.
// After the 'send' button has been pressed, errors are checked and the fields that need correcting indicated.
function DisplayForm($values, $errors)
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta name="description" content="Electricians in Birmingham with over 20 years experience. For a proper legally certified installation contact our Birmingham Electricians on 0121 429 1586"/>
<meta name="keywords" content="Birmingham Electrician,Electrician Birmingham,Electrical Contractors Birmingham,Birmingham Electrical Contractors,Electrician,Birmingham,Electrician Solihull"/>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<title>Birmingham Electrician | Electrician in Birmingham | Full and Partial House Rewires</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.74.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.slideshow').cycle({
fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
});
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>