제출 버튼을 클릭하면 오류 페이지가 나타납니다. 여기 사이트 http://nealconstruction.com/estimate.html내 PHP 문제를 파악할 수 없습니다. 누구든지 PHP 코드를 사용할 수 있습니까?
<?php
/* Subject and Email Varibles */
$emailSubject = 'Estimate'
$webMaster = '[email protected]'
/* Gathering Info */
$emailField = $_POST ['email'];
$nameField = $_POST ['name'];
$phoneField = $_POST ['phone'];
$typeField = $_POST ['type'];
$locationField = $_POST ['location'];
$infoField = $_POST ['info'];
$contactField = $_POST ['contact'];
$body = <<<EOD
<br><hr><br>
Email: $email <br>
Name: $name <br>
Phone Number: $phone <br>
Type Of Job: $type <br>
Location: $location <br>
Additional Info: $info <br>
How to Contact: $contact <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-Type: text/html\r\n";
$success = mail($webMaster; $emailSubject; $body; $headers);
/* Results rendered as 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 information! We will contact you very soon!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
이것은 실제로 stackoverflow에 속합니다. – devicenull
어떤 오류가 발생합니까? – Jonah
모든 HTML을 문자열에 넣지 말고 그냥'?>'뒤에 넣으십시오. – Jonah