Hi,
I am trying to sort out a php email form on my webpage...I am working on my pc, and haven;t uploaded the page yet..
I have looked at a small tutorial...but I can't seem to get it to work. I created a feedback.htm, which is saved on my desktop, and a sendmail.php saved to my htdocs file in the Apache folder.
When I click send, I get the page cannot be displayed...
If I save my feenback.htm to the htdocs file, I click send and the .php file wants to download, ie I get a window that asks if I want to save, or open the file...
The code I have used from the tutorial for sendmail.php,
is
<?
$email=$REQUEST['email'];
$message=$REQUEST['message'];
mail("info@synaxisolutions.co.uk", "Feedback form results",
$message, "Form:$email");
header ("Location: [url]http://www.example.com/thankyou.htm[/url]");
?>
and the forms code for feedback.htm is
<form method="post" action="sendmail.php" id="myform">
<fieldset>
<legend>Contact form</legend>
<label for="enquiryname"><span>Name: <strong class="red_text">*</strong></span></label>
<input type="text" name="enquiryname" id="enquiryname" value="" size="32" /><br />
<label for="enquiryemail"><span>Email Address: <strong class="red_text">*</strong></span></label>
<input type="text" name="enquiryemail" id="enquiryemail" value="" size="32" /><br />
<label for="enquirytelephone"><span>Telephone:</span></label>
<input type="text" name="enquirytelephone" id="enquirytelephone" value="" size="32" /><br />
<label for="enquiryaddress1"><span><strong>Address Line 1:</strong> <strong class="red_text">*</strong></span></label>
<input type="text" name="enquiryaddress1" id="enquiryaddress1" size="32" value="" /><br />
<label for="enquiryaddress2"><span>Address Line 2:</span></label>
<input type="text" name="enquiryaddress2" id="enquiryaddress2" size="32" /><br />
<label for="enquirytown"><span>Town: <strong class="red_text">*</strong></span></label>
<input type="text" name="enquirytown" id="enquirytown" size="32" /><br />
<label for="enquirypostcode"><span>Postcode: <strong class="red_text">*</strong></span></label>
<input type="text" name="enquirypostcode" id="enquirypostcode" value="" size="8" /><br />
<label for="enquirycomments" class="textarea"><span>Comments or questions <strong class="red_text">*</strong></span></label>
<textarea name="enquirycomments" id="enquirycomments" cols="50" rows="10"></textarea><br />
<label for="enquirynewsletter" class="right"><span><input type="checkbox" name="enquirynewsletter" id="enquirynewsletter" value="checkbox" /></span></label>
<div class="comment">Tick if you wish to receive David Mundell's email newsletters</div></p>
<label style="border:none;"><span></span></label>
<input class="button" type="submit" value="Send" name="submit" class="submit" />
</fieldset>
</form>
Anyhelp would be greatly appreciated...