P
Pourya J
Guest
I have uploaded both of my html form file and php form processor on my server.
you can find my form on http://toolsandtutorials.com/form/Untitled-1.html.html
when I press submit button, instead of sending email and going to thank you page, it shows the php file. How can I fix it?
my documents are as follows:
1- html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<p></p>
<p></p>
<p></p>
<p></p>
<form id="form1" name="form1" method="post" action="http://www.toolsandtutorials.com/cgi-bin/contactformprocess.php">
<table width="100%" border="0" cellpadding="6">
<tr>
<td><div align="right">
<label for="email">Email:</label>
</div></td>
<td><div align="left">
<input name="email" type="text" id="email" size="35" maxlength="90" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="name">Name:</label>
</div></td>
<td><div align="left">
<input name="name" type="text" id="name" size="35" maxlength="80" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="phone">Phone:</label>
</div></td>
<td><div align="left">
<input name="phone" type="text" id="phone" size="35" maxlength="12" />
</div></td>
</tr>
<tr>
<td><div align="right">Budget:</div></td>
<td><div align="left">
<p>
<label>
<input type="radio" name="budget" value="less than 1000" id="budget_0" />
Less than $1,000</label>
<br />
<label>
<input type="radio" name="budget" value="1000- 2500" id="budget_1" />
$1,000- $2,500</label>
<br />
<label>
<input type="radio" name="budget" value="2500- 5000" id="budget_2" />
$2,500- $5,000</label>
<br />
<label>
<input type="radio" name="budget" value="5000- 10000" id="budget_3" />
$5,000- $10,000</label>
<br />
<label>
<input type="radio" name="budget" value="10000+" id="budget_4" />
$10,000 +</label>
<br />
</p>
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="travelers">Number of Travelers:</label>
</div></td>
<td><div align="left">
<select name="travelers" id="travelers">
<option>Choose...</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="10+">10+</option>
</select>
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="comments">Comments:</label>
</div></td>
<td><div align="left">
<textarea name="comments" id="comments" cols="26" rows="5"></textarea>
</div></td>
</tr>
<tr>
<td><div align="right"></div></td>
<td><div align="left">
<input type="checkbox" name="newsletter" id="newsletter" />
<label for="newsletter"> Subscribe to Our FREE Online Newsletter!</label>
</div></td>
</tr>
<tr>
<td><div align="right">
<input type="reset" name="Reset" id="button" value="Reset Form!" />
</div></td>
<td><div align="left">
<label for="submit"></label>
<input type="submit" name="submit" id="submit" value="Send Email!" />
</div></td>
</tr>
</table>
</form>
<p></p>
</body>
</html>
2-php
<?php
/* Subject and Email Variables */
$emailSubject = ' Crazy PHP Scripting! ' ;
$webMaster = ' [email protected] ' ;
/* Gathering Data Variables */
$emailField = $_POST ['email'] ;
$nameField = $_POST ['name'] ;
$phoneField = $_POST ['phone'] ;
$budgetField = $_POST ['budget'] ;
$travelersField = $_POST ['travelers'] ;
$commentsField = $_POST ['comments'] ;
$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 = "Form: $email\r\n";
$headers .= "content-type: text/html\r\n";
$success = mail ($webMaster, $emailsubject, $budy,
$headers) ;
/* results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<titl
you can find my form on http://toolsandtutorials.com/form/Untitled-1.html.html
when I press submit button, instead of sending email and going to thank you page, it shows the php file. How can I fix it?
my documents are as follows:
1- html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<p></p>
<p></p>
<p></p>
<p></p>
<form id="form1" name="form1" method="post" action="http://www.toolsandtutorials.com/cgi-bin/contactformprocess.php">
<table width="100%" border="0" cellpadding="6">
<tr>
<td><div align="right">
<label for="email">Email:</label>
</div></td>
<td><div align="left">
<input name="email" type="text" id="email" size="35" maxlength="90" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="name">Name:</label>
</div></td>
<td><div align="left">
<input name="name" type="text" id="name" size="35" maxlength="80" />
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="phone">Phone:</label>
</div></td>
<td><div align="left">
<input name="phone" type="text" id="phone" size="35" maxlength="12" />
</div></td>
</tr>
<tr>
<td><div align="right">Budget:</div></td>
<td><div align="left">
<p>
<label>
<input type="radio" name="budget" value="less than 1000" id="budget_0" />
Less than $1,000</label>
<br />
<label>
<input type="radio" name="budget" value="1000- 2500" id="budget_1" />
$1,000- $2,500</label>
<br />
<label>
<input type="radio" name="budget" value="2500- 5000" id="budget_2" />
$2,500- $5,000</label>
<br />
<label>
<input type="radio" name="budget" value="5000- 10000" id="budget_3" />
$5,000- $10,000</label>
<br />
<label>
<input type="radio" name="budget" value="10000+" id="budget_4" />
$10,000 +</label>
<br />
</p>
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="travelers">Number of Travelers:</label>
</div></td>
<td><div align="left">
<select name="travelers" id="travelers">
<option>Choose...</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="10+">10+</option>
</select>
</div></td>
</tr>
<tr>
<td><div align="right">
<label for="comments">Comments:</label>
</div></td>
<td><div align="left">
<textarea name="comments" id="comments" cols="26" rows="5"></textarea>
</div></td>
</tr>
<tr>
<td><div align="right"></div></td>
<td><div align="left">
<input type="checkbox" name="newsletter" id="newsletter" />
<label for="newsletter"> Subscribe to Our FREE Online Newsletter!</label>
</div></td>
</tr>
<tr>
<td><div align="right">
<input type="reset" name="Reset" id="button" value="Reset Form!" />
</div></td>
<td><div align="left">
<label for="submit"></label>
<input type="submit" name="submit" id="submit" value="Send Email!" />
</div></td>
</tr>
</table>
</form>
<p></p>
</body>
</html>
2-php
<?php
/* Subject and Email Variables */
$emailSubject = ' Crazy PHP Scripting! ' ;
$webMaster = ' [email protected] ' ;
/* Gathering Data Variables */
$emailField = $_POST ['email'] ;
$nameField = $_POST ['name'] ;
$phoneField = $_POST ['phone'] ;
$budgetField = $_POST ['budget'] ;
$travelersField = $_POST ['travelers'] ;
$commentsField = $_POST ['comments'] ;
$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 = "Form: $email\r\n";
$headers .= "content-type: text/html\r\n";
$success = mail ($webMaster, $emailsubject, $budy,
$headers) ;
/* results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<titl