Home › Forums › Back End › Undefined variable: error's just started showing up › Reply To: Undefined variable: error's just started showing up
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<META NAME=”keywords” CONTENT=”Dunfermline,Rosyth,Cairneyhill,Culross, Kincardine,Inverkeithing,Burntisland, Cowdenbeath,Kinghorn,Loghgelly,Kircaldy, Dysart,Buckhaven,Methill, Leven,Glenrothes,Leslie,Markinch,Saline,Carnock,Oakley, Conrie,Blairhall,Crossford,Torryburn, Limekilns,Crombie,Dalgety Bay,Crossgates, Clackmannan,Aloa,Queensferry,North Queensferry,Edinburgh,Limo,Limo Hire, Limousine Hire,Car Hire,Chauffeur Hire, Chauffeur Driven,Chauffeur Driven Car Hire,limo,
hire,dunfermline,exquisitelimousines,exquisite, limo,limousine,limousines,hire,fife, dunfermline,black,kirkcaldy,leven, glenrothes,edinburgh,stirling,falkirk, scotland,uk,travel,transport,wedding, crossford,lincoln,black,120,anniversaries, birthday,concert,prom,parties,shopping, trip,sport,night,town,hen,stag,casino, airport,transfer,tour,luxury,style,lincon, scottish,stretch,american,scotland, ecquisite,ezquisite,exquidite,exquiaite, exquisote,exquosite,exquisute,exquusite, limohiredunfermline”>
Limo Hire Leven, for cheap Limo Hire in Leven
<?php
/* ========================= Begin Configuration ============================ */
define("kContactEmail","[email protected]");
/* ========================= End Configuration ============================== */
// init variables
$error_msg = 'The following fields were left empty or contain invalid information:
- ‘;
- Full Name
- Phone Number
- E-mail Address
$error = false;
// determine is the form was submitted
$submit = $_POST[‘submit’];
if (empty($submit))
$form_submitted = false;
else
$form_submitted = true;
if ($form_submitted) {
// read out data
$name = $_POST[‘name’];
$date = $_POST[‘date’];
$email = $_POST[’email’];
$car = $_POST[‘car’];
$seats = $_POST[‘seats’];
$phone = $_POST[‘phone’];
$mobile = $_POST[‘mobile’];
$advert = $_POST[‘advert’];
$message = $_POST[‘message’];
// verify required data
if(!$name) { $error_msg .= “
“; $error = true; }
if(!$phone) { $error_msg .= “
“; $error = true; }
if($email) { if(!eregi(“^[a-z0-9_]+@[a-z0-9\-]+\.[a-z0-9\-\.]+$”, $email)){ $error_msg .= “
“; $error = true; }}
$error_msg .= “
“;
// email message if no errors occurred
if (!$error) {
// prepare message
$msg = “Full Name: \t $name \n”;
$msg .= “Date of Hire: \t $date \n”;
$msg .= “E-mail Address: \t $email \n”;
$msg .= “Type of car: \t $car \n”;
$msg .= “Number of Seats: \t $seats \n”;
$msg .= “Phone Number: \t $phone \n”;
$msg .= “Mobile Number: \t $mobile \n”;
$msg .= “How did you hear about us: \t $advert \n”;
$msg .= “Message: \n—\n $message \n—\n”;
$subject = “Website Contact Form Results”;
// prepare message header
$mailheaders = “MIME-Version: 1.0\r\n”;
$mailheaders .= “Content-type: text/plain; charset=iso-8859-1\r\n”;
$mailheaders .= “From: $name \r\n”;
$mailheaders .= “Reply-To: $name \r\n”;
// send out email
mail(kContactEmail, $subject ,stripslashes($msg), $mailheaders);
}
}
?>
.
Get in touch for a limo hire quote
Address:
13 Menteith Drive,
Dunfermline.
Fife.
KY11 8RR
Telephone:
01383 731 322
07879 257 291
http://www.exquisitelimousines.co.uk
Request a quote via text message for a rapid response between the hours of 9am & 9pm.
Simply TEXT the word "QUOTE" to 07879257291 and someone will phone you back to discuss your requirements.
—————————————————
Thank you for your feedback, .
This is the information you submitted:
<?php
}
// display contact form
else {
// display error message
if ($error) {
echo "” . $error_msg . “\n”;
}
?>
Please fill out and submit the form on this page to contact us. We will get back to you
as soon as we can. Note that fields marked with * are
required fields.
<form action="” method=”post” name=”contact”>
Full Name*
<input name="name" type="text" value="” size=”40″>
Date of Hire
<input name="date" type="text" id="Date of Hire" value="” size=”30″>
E-mail Address
<input name="email" type="text" value="” size=”40″>
Phone Number*
<input name="phone" type="text" value="” size=”30″>
Number of Seats Needed
<select name="seats" id="seats" >
1
2
3
4
5
6
7
8
— + 8 Requires 2 cars —
9
10
11
12
13
14
15
16
16+
Mobile Number
<input name="mobile" type="text" id="mobile" value="” size=”30″ />
How did you find us
<select name="advert" id="advert" value="”>
Choose One
Google
Yahoo!
MSN Search
AOL Search
Internet Yellow Pages
Other Search Engine – Indicate Below
Friend
Yellow Pages
Website Link – Indicate Below
Poster or Leaflet
Other – Indicate Below
Type of car
<select name="car" id="car" >
Pink
Black
Please provide us with any other information or special requests
13 Menteith Drive, Dunfermline
Fife Scotland KY11 8RR
Tel. 01383 731322
Mob. 07879 257291
Get Directions
_uacct = “UA-3066057-1”;
urchinTracker();