This web form -
http://www.pauserefreshment.co.uk/coffee-machine-brochure-request.html
has a strange problem and its this - it just wont capture the data entered in the first name box :-(
Every other field is ok but this is the output when you enter everything in the form:
First:
Surname: Honan
eMail: david@
Address: Unit 3
Address line 2: 128 Thornes lane
Post code: WF!
City / Town: Wakefield
La Spaziale: on
Koro: on
Franke: on
Vision 400: on
Darenth: on
Mondo: on
Marco qwickbrew: on
La Cimbali: on
Note the first name filed is empty despite filling it in :-(
Here is the offending code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="ROBOTS" CONTENT="NOINDEX,NOFOLLOW" />
<meta name="Description" CONTENT="Request postal delivery of a coffee machine brochure for your office, hotel or pub" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Coffee machine brochure request form | pause... refreshment</title>
<link rel="stylesheet" type="text/css" href="css/brochure_form.css">
</head>
<body>
<form action="brochure.php" method="post">
<h1>"Order a brochure"</h1>
<fieldset>
<div id="contact_details">
<h2>Please enter your contact details</h2>
<label for="first">First Name</label>
<input type="text" name="first" id="first"/>
</div>
<div id="contact_details" >
<label for="secondname">Second Name</label>
<input type="text" name="secondname" id="secondname" />
</div>
<div id="contact_details">
<label for="email">e Mail</label>
<input type="text" name="email" id="email" />
</div>
<div id="contact_details">
<label for="company">Company name</label>
<input type="text" name="company" id="company"/>
</div>
<div id="contact_details">
<label for="address">Address Line 1</label>
<input type="text" name="address" id="address"/>
</div>
<div id="contact_details">
<label for="address2">Address Line 2</label>
<input type="text" name="address2" id="address2"/>
</div>
<div id="contact_details">
<label for="city">City / Town</label>
<input type="text" name="city" id="city"/>
</div>
<div id="contact_details">
<label for="postcode">Postcode</label>
<input type="text" name="postcode" id="postcode"/>
</div>
<div id="brochure_pick">
<h2>Select the brochure(s) you want posted</h2>
<h3>Traditional & bean to cup<br/>
"Ideal for restaurants and cafes"</h3>
<label for="laspaziale">La Spaziale</label>
<input type="checkbox" name="laspaziale" id="laspaziale" />
<label for="lacimbali">La Cimabli M1</label>
<input type="checkbox" name="lacimbali" id="lacimbali" />
<label for="Koro">Koro</label>
<input type="checkbox" name="koro" id="koro" />
<label for="franke">Franke Flair</label>
<input type="checkbox" name="franke" id="franke" />
<h3>Instant<br/>
"Ideal for offices"</h3>
<div id="brochure_pick">
<label for="vision400">Vision 400</label>
<input type="checkbox" name="vision400" id="vision400" />
<label for="darenth">Darenth</label>
<input type="checkbox" name="darenth" id="darenth" />
</div>
<h3>Filter<br/>
"Ideal for most set ups"</h3>
<label for="mondo">Mondo</label>
<input type="checkbox" name="mondo" id="mondo" />
<label for="marco">Marco qwikbrew</label>
<input type="checkbox" name="marco" id="marco" />
</div>
<div id="send">
<input type="submit" value="Order Brochure">
</div>
</fieldset>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Customer coffee machine brochure request</title>
</head>
<body>
<h2>Your brochure request has been received and will be delivered shortly!</h2>
<?php
ini_set("sendmail_from", "user@yourdomain.com");
if (empty($_SERVER['HTTP_REFERER']) || (
(!strstr($_SERVER['HTTP_REFERER'], "http://dev.spookmedia.com/")) &&
(!strstr($_SERVER['HTTP_REFERER'], "http://pause.zippy.sdev.net/")) &&
(!strstr($_SERVER['HTTP_REFERER'], "http://www.pause.co.uk/"))&&
(!strstr($_SERVER['HTTP_REFERER'], "http://www.pauserefreshment.co.uk/"))&&
(!strstr($_SERVER['HTTP_REFERER'], "http://www.refreshments.co.uk/"))
))
$first = $_POST['first'];
$surname = $_POST['secondname'];
$email = $_POST['email'];
$company = $_POST['company'];
$address = $_POST['address'];
$address2 = $_POST['address2'];
$city = $_POST['city'];
$post_code = $_POST['postcode'];
$spaz = $_POST ['laspaziale'];
$lacimbali = $_POST ['lacimbali'];
$koro = $_POST ['koro'];
$vision400 = $_POST ['vision400'];
$franke = $_POST ['franke'];
$darenth = $_POST ['darenth'];
$mondo = $_POST ['mondo'];
$marco = $_POST ['marco'];
$to = 'hello@pause.co.uk';
$subject = 'Coffee machine brochure request';
$msg = "First: $first\n" .
"Surname: $surname\n" .
"eMail: $email\n" .
"Address: $address\n" .
"Address line 2: $address2\n" .
"Post code: $post_code\n" .
"City / Town: $city\n" .
"La Spaziale: $spaz\n" .
"Koro: $koro\n" .
"Franke: $franke\n" .
"Vision 400: $vision400\n" .
"Darenth: $darenth\n" .
"Mondo: $mondo\n" .
"Marco qwickbrew: $marco\n" .
"La Cimbali: $lacimbali\n";
mail($to, $subject, $msg, 'From:' . $email);
header('Location: http://www.pauserefreshment.co.uk');
?>
</body>
</html>
Any insights welcome :-)