bluebirdjc
03-26-2007, 07:50 PM
im having trouble dispalying a message using php after pressing a submit button i have created for a form in html
Here is my hmtl code
<html>
<head>
<title>contactform</title>
</head>
<form method="POST" action="proccessform2.php">
<body>
<br>
This is a contact form for making comments on his website or you are intrested in a house advertised on our website then please fill out this form and send to us and our help team will contact you back as soon as possible.
<br><br>
First Name: <input type="text" name="first">
<br><br>
Second Name: <input type="text" name="last">
<br><br>
Telephone: <input type="text" name="telephone">
<br><br>
Email Address: <input type="text" name="email">
<br><br>
Mobile: <input type="text" name="mobile">
<br><br>
Address line 1 please enter house number: <input name="addressline1">
<br><br>
Address line 2 please enter street name: <input name="addressline2">
<br><br>
Address line 3 please enter area located: <input name="addressline3">
<br><br>
Please give the city or town you live in: <input name="city">
<br><br>
Are you intrested in a house: <input type="checkbox" name="are you intrested in a house" VALUE="are you intrested in a house">
<br><br>
Area located:
<select name="area located">
<option selected>No house selected
<option>Roath
<option>Splott
<option>Whitchurch
<option>Ely
<option>Grangetown
<option>Llanrummney
<option>Rummney
<option>Tremorfa
<option>Canton
<option>Bluetown
<option>Llandaff
</select>
<br><br>
Please give house name: <input type="text" name="hname">
<br><br>
<p>
Comments: <textarea name="Comments" rows="5" cols="45">Comments are...</textarea>
<br><BR>
<input type="submit" name="submit" value="submit form">
<br>
<br>
<A HREF="Homepage.html">home</A>
</form>
</body>
<html>
and this is my php code
<html>
<head>
<title>Results of contact form</title>
</head>
<body>
<?php
$firstname = $_REQUEST["first"];
$secondname = $_REQUEST["last"];
$telephone = $_REQUEST["telephone"];
$email = $_REQUEST["email"];
$mobile = $_REQUEST["mobile"];
$address line 1 = $_REQUEST["addressline1"];
$address line 2 = $_REQUEST["addressline2"];
$address line 3 = $_REQUEST["adressline3"];
$city or town = $_REQUEST["city"];
$are you interested in a house= $_REQUEST["areyouintrestedinahouse"];
$area = $_REQUEST["arealocated"];
$house name = $_REQUEST["hname"];
$comments = $_REQUEST["comments"];
echo "Thank you for completing this form we will get back top you as soon as possible"
?>
</form>
</body>
</html>
anyone know what i have done wrong
Here is my hmtl code
<html>
<head>
<title>contactform</title>
</head>
<form method="POST" action="proccessform2.php">
<body>
<br>
This is a contact form for making comments on his website or you are intrested in a house advertised on our website then please fill out this form and send to us and our help team will contact you back as soon as possible.
<br><br>
First Name: <input type="text" name="first">
<br><br>
Second Name: <input type="text" name="last">
<br><br>
Telephone: <input type="text" name="telephone">
<br><br>
Email Address: <input type="text" name="email">
<br><br>
Mobile: <input type="text" name="mobile">
<br><br>
Address line 1 please enter house number: <input name="addressline1">
<br><br>
Address line 2 please enter street name: <input name="addressline2">
<br><br>
Address line 3 please enter area located: <input name="addressline3">
<br><br>
Please give the city or town you live in: <input name="city">
<br><br>
Are you intrested in a house: <input type="checkbox" name="are you intrested in a house" VALUE="are you intrested in a house">
<br><br>
Area located:
<select name="area located">
<option selected>No house selected
<option>Roath
<option>Splott
<option>Whitchurch
<option>Ely
<option>Grangetown
<option>Llanrummney
<option>Rummney
<option>Tremorfa
<option>Canton
<option>Bluetown
<option>Llandaff
</select>
<br><br>
Please give house name: <input type="text" name="hname">
<br><br>
<p>
Comments: <textarea name="Comments" rows="5" cols="45">Comments are...</textarea>
<br><BR>
<input type="submit" name="submit" value="submit form">
<br>
<br>
<A HREF="Homepage.html">home</A>
</form>
</body>
<html>
and this is my php code
<html>
<head>
<title>Results of contact form</title>
</head>
<body>
<?php
$firstname = $_REQUEST["first"];
$secondname = $_REQUEST["last"];
$telephone = $_REQUEST["telephone"];
$email = $_REQUEST["email"];
$mobile = $_REQUEST["mobile"];
$address line 1 = $_REQUEST["addressline1"];
$address line 2 = $_REQUEST["addressline2"];
$address line 3 = $_REQUEST["adressline3"];
$city or town = $_REQUEST["city"];
$are you interested in a house= $_REQUEST["areyouintrestedinahouse"];
$area = $_REQUEST["arealocated"];
$house name = $_REQUEST["hname"];
$comments = $_REQUEST["comments"];
echo "Thank you for completing this form we will get back top you as soon as possible"
?>
</form>
</body>
</html>
anyone know what i have done wrong