problem with contact form
Posted: Wed Oct 10, 2007 10:16 am
Hello Everyone.
I am hoping that someone will be able to help me out with a problem.
I have very limited knowledge of php and am having trouble with a contact form.
The code is as follows:
I don't know if this is the best code to use, but it has always worked for me in the past. However I can't get my current project to work with this code as the website is hosted on a windows server. When I done phpinfo.php there is no value set against sendmail_path but on the bit that says sendmail_from it is set to me@locahost.com.
Can anyone point me in the right direction to a tutorial perhaps on how to get a contact form to work with only the sendmail_from set?? I don't even know if this is possible at all, I've tried googling for it but have come up with nothing
Thanks in advance.
I am hoping that someone will be able to help me out with a problem.
I have very limited knowledge of php and am having trouble with a contact form.
The code is as follows:
Code: Select all
<?php
$to = "me@mydomain.co.uk";
$re = "Website Feedback";
$msg = "Title: $title
Name: $name
Surname: $surname
Email: $email
Telephone: $telephone
Best Time To Call: $time
Life Cover: $lifecover
Mortgage Payment Protection: $mortgage
Critical Illness: $critical
Building and Contents Insurance: $building
Enquiry: $enquiry";
mail ($to,$re,$msg);
?>Can anyone point me in the right direction to a tutorial perhaps on how to get a contact form to work with only the sendmail_from set?? I don't even know if this is possible at all, I've tried googling for it but have come up with nothing
Thanks in advance.