problem getting my contact form working
Posted on
16th Feb 2014 07:03 pm by
admin
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm having a real problem getting it functioning properly. My real issue is the user inputed information is not getting sent with the email. I haven't added all the fields to the email yet as I'm trying to get it right first then populating all of the fields. Anyway my code is below:
hairinfo.html
Code: <form name="hairinfo" method="POST" action="hair/EmailToForm.php">
<table border="0" align="center" background="images/blackopaque.png" class="contact">
<tr>
<td width="100">Name</td>
<td><input name="name" type="text" id="name" class="contactBox" size="30"></td>
</tr>
<tr>
<td width="100">Service</td>
<td class="contactBox">
<input type="radio" name="hairservice" value="Cut" id="hairservice"> Cut
<input type="radio" name="hairservice" value="Colour" id="hairservice"> Colour
<input type="radio" name="hairservice" value="Hair Up" id="hairservice"> Hair Up
<input type="radio" name="hairservice" value="Set" id="hairservice"> Set
<input type="radio" name="hairservice" value="Style" id="hairservice"> Style
</td>
</tr>
<td width="100">Address</td>
<td><input name="address" type="text" class="contactBox" id="address" size="30"></td>
</tr>
<tr>
<td width="100">City</td>
<td><input name="city" type="text" class="contactBox" size="30"></td>
</tr>
<tr>
<td width="100">Date</td>
<td><input name="date" type="text" class="contactBox160" id="date"/>
<script language="JavaScript">
new tcal ({
// form name
'formname': 'testinput',
// input name
'controlname': 'testinput'
});</script>
</td>
</tr>
<tr>
<td width="100">E-Mail</td>
<td><input name="email" type="text" id="emailaddress" class="contactBox" size="30" ></td>
</tr>
<tr>
<td width="100">Phone Number</td>
<td><input name="phone" type="text" class="contactBox" size="30" id="phone"></td>
</tr>
<tr>
<td width="100"> </td>
<td> </td>
</tr>
<tr>
<td width="100" valign="top">Brief</td>
<td><textarea name="message" cols="23" rows="9" class="contactBox" id="message"></textarea></td>
</tr>
<tr>
<td width="100"></td>
<td><input name="send" type="submit" class="inputField" value="Send" /></td>
</tr>
<tr>
<td colspan="2"><em>For a faster reply, text your booking information to: 021 0259 6543</em></td>
</tr>
</table>
</form>
hair/EmailToForm.php
Code: <?php
// Contact subject
$subject ='Hair Booking';
// Details
$message="$message";
// Mail of sender
$mail_from="$emailaddress";
// From
$header="from: $name <$mail_from>";
// Enter your email address
$to ='kerry@manukadesign.co.nz';
$send_contact=mail($to,$subject,$message,$header);
// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo "Thanks, we've recived your contact information<br />
and we will be in touch as soon as possible about your request";
}
else {
echo "ERROR";
}
?>
I would really appreciate any help offered.
Thanks
No comments posted yet
Your Answer:
Login to answer
151
51
Other forums
array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child
try catch error
I have been trying try catch but, I can't get it to work. The code opens a non existing file called
need help in update query
hi
i have a dynamic form. i need help in how can i use update query when values from dynamic for
What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c
confused between ' ' and " "
there is a php i set:
$begin_date_query = mysql_query( "SELECT SUBDATE(due_date, INTERVAL $d
PHP Display Telephone Number On Referrer
I have used the php below to show a different telephone number in the header of the site depending u
PHP Redirecting
Hello everyone. Is there a way to redirect people to pages within a statement in PHP? Since there is
classic dynpro : hide area and auto adjust hights
Hi,
I want to develop a similar user interface as is used in standard transaction MIGO.
Why does this file not return file names that start with numbers?
This file returns a list of filenames to help populate a drop down in my form. For some reason it ig
PHP error (line 38) my website
Hello everyone, I'm new on this
and I got a web site thats got a error not showing the photos on<