Hi there, i hope someone can help me with my problem......
I have designed a web site and developed it already, i am on my Contact page and i am trying to write a php script for the user to send me email..........i have the code, and i followed several tutorials and i think teh code could be fine........anyways, when i click on the button to submit the information and to send i get a window popping up saying what programme should i use to open PHP files.......i really dont know where i have gone wrong?
below is the PHP code i am using............Can someone please have a look at it and tell me if there is anything wrong and im getting the window that asks me what should php be opened with.......?
many thanx, guys.....
<?php
/* SUBJECT AND EMAIL VARIABLES */
$emailSubject = 'Crazy PHP Scirpting!';
$webMaster = 'artashh@aol.com';
/* Gathering Data Variables */
$emailField = $_POST['email'];
$nameField = $_POST['name'];
$phoneField = $_POST['phone'];
$budgetField = $_POST['budget'];
$travelersField = $_POST['travelers'];
$commentField = $_POST['comment'];
$newsletterField = $_POST['newsletter'];
$body = <<<EOD
<br><hr><br>
Email: $email <br>
Name: $name <br>
Phone Number: $phone <br>
Budget: $budget <br>
Number of Travelers: $travelers <br>
Comments: $comments <br>
Newsletter: $newsletter <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results on HTML */
$theResults = <<<EOD
<html>
<head>
<title>JakesWorks - travel made easy-Homepage</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #f1f1f1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #666666;
text-decoration: none;
}
-->
</style>
</head>
<div>
<div align="left">Thank you for your interest! Your email will be answered very soon!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>