email form
Posted: Mon May 02, 2005 8:08 am
Hi,
I am trying to sort out a php email form on my webpage...I am working on my pc, and haven;t uploaed the page yet..
I have looked at a small tutorial...but I can't seemt o 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
and the forms code for feedback.htm is
(I hope I have placed this in the correct tags.)
Anyhelp would be greatly appreciated...
d11wtq | Please read the sticky about posting code in the forums
I am trying to sort out a php email form on my webpage...I am working on my pc, and haven;t uploaed the page yet..
I have looked at a small tutorial...but I can't seemt o 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
Code: Select all
<?
$email=$_REQUEST['email'];
$message=$_REQUEST['message'];
mail("info@synaxisolutions.co.uk", "Feedback form results",
$message, "Form:$email");
header ("Location: http://www.example.com/thankyou.htm");
?>Code: Select all
<form method="e;post"e; action="e;sendmail.php"e; id="e;myform"e;>
<fieldset>
<legend>Contact form</legend>
<label for="e;enquiryname"e;><span>Name: <strong class="e;red_text"e;>*</strong></span></label>
<input type="e;text"e; name="e;enquiryname"e; id="e;enquiryname"e; value="e;"e; size="e;32"e; /><br />
<label for="e;enquiryemail"e;><span>Email Address: <strong class="e;red_text"e;>*</strong></span></label>
<input type="e;text"e; name="e;enquiryemail"e; id="e;enquiryemail"e; value="e;"e; size="e;32"e; /><br />
<label for="e;enquirytelephone"e;><span>Telephone:</span></label>
<input type="e;text"e; name="e;enquirytelephone"e; id="e;enquirytelephone"e; value="e;"e; size="e;32"e; /><br />
<label for="e;enquiryaddress1"e;><span><strong>Address Line 1:</strong> <strong class="e;red_text"e;>*</strong></span></label>
<input type="e;text"e; name="e;enquiryaddress1"e; id="e;enquiryaddress1"e; size="e;32"e; value="e;"e; /><br />
<label for="e;enquiryaddress2"e;><span>Address Line 2:</span></label>
<input type="e;text"e; name="e;enquiryaddress2"e; id="e;enquiryaddress2"e; size="e;32"e; /><br />
<label for="e;enquirytown"e;><span>Town: <strong class="e;red_text"e;>*</strong></span></label>
<input type="e;text"e; name="e;enquirytown"e; id="e;enquirytown"e; size="e;32"e; /><br />
<label for="e;enquirypostcode"e;><span>Postcode: <strong class="e;red_text"e;>*</strong></span></label>
<input type="e;text"e; name="e;enquirypostcode"e; id="e;enquirypostcode"e; value="e;"e; size="e;8"e; /><br />
<label for="e;enquirycomments"e; class="e;textarea"e;><span>Comments or questions <strong class="e;red_text"e;>*</strong></span></label>
<textarea name="e;enquirycomments"e; id="e;enquirycomments"e; cols="e;50"e; rows="e;10"e;></textarea><br />
<label for="e;enquirynewsletter"e; class="e;right"e;><span><input type="e;checkbox"e; name="e;enquirynewsletter"e; id="e;enquirynewsletter"e; value="e;checkbox"e; /></span></label>
<div class="e;comment"e;>Tick if you wish to receive David Mundell's email newsletters</div></p>
<label style="e;border:none;"e;><span></span></label>
<input class="e;button"e; type="e;submit"e; value="e;Send"e; name="e;submit"e; class="e;submit"e; />
</fieldset>
</form>Anyhelp would be greatly appreciated...
d11wtq | Please read the sticky about posting code in the forums