我已经阅读了很多关于这个主题的主题,在这里尝试了许多解决方案,但仍未能找到解决问题的方法。
我在网站上有一个简单联系表格的联系页面。一切正常。点击发送,您在发送后永远不会离开联系页面,代码会给出已发送电子邮件的回复。工作得很漂亮。我的朋友还想创建一个更全面的联系页面,并将其称为“报价”页面。我只是编辑了联系页面上的代码行以获取其他信息框,并将php文件重命名为send2,它也可以正常工作,但只需挂断一个。它解析为一个空白的白色php页面(我默认猜测)让我知道邮件已发送。
以下内容将包含该网站的链接以及引用页面html和php的代码
http://www.eaiperformance.com/quote.html
send2.php
<?php
/*** ---------- CHANGE THIS TO YOUR EMAIL ADDRESS ------------- ***/
$MAIL_TO = 'email@someplace.com';
/*** ---------------------------------------------------------- ***/
$subject = "EAI Performance :: New Message";
$time = date('M-d-Y h:i');
$name = $_POST['name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$make = $_POST['make'];
$model = $_POST['model'];
$year = $_POST['year'];
$engine = $_POST['engine'];
$transmission = $_POST['transmission'];
$milage = $_POST['milage'];
$mods = $_POST['mods'];
$goals = $_POST['goals'];
$body = "Time: $time\n";
$body .= "Name: $name\n";
$body .= "Phone: $phone\n";
$body .= "Email: $email\n";
$body .= "Make: $make\n";
$body .= "Model: $model\n";
$body .= "Year: $year\n";
$body .= "Engine: $engine\n";
$body .= "Transmission: $transmission\n";
$body .= "Milage: $milage\n";
$body .= "Mods: $mods\n";
$body .= "Goals: \n$goals";
$success = @mail($MAIL_TO, $subject, $body);
if ($success) {
echo 'Thank you! Your message has been sent. <br /> We will respond to you as soon as possible.';
} else {
echo 'Uh oh! Something went wrong. Please try again.';
}
?>
quote.html
<section id="content" class="left">
<form action="php/send2.php" method="post" id="contact">
<section class="entry">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3453.4499223139765!2d-95.4781436!3d30.0526353!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x864733563d1e4ead%3A0x7409ac0293de74ef!2s19525+Wied+Rd%2C+Spring%2C+TX+77388!5e0!3m2!1sen!2sus!4v1430095561916" width="186" height="186" frameborder="0" style="border:0"></iframe>
<p>Thank you for your interest in receiving a quote for service. Please fill out all areas in this form. All sections are required and essential for EAI to be able to accurately provide you a quote for service or a complete build. Also please be sure to be as thorough as possible in the “Existing Modifications” as well as "Goals and Expectations" sections of this form. We do not want to give you an estimate that includes parts you already have. We also find it best to know each customers goals and expectations in order to personally tailor the build to your specific needs, goals and budget you have to work with.</p>
<ul>
<li><span>Email</span></li>
<li><span>Phone</span></li>
<li><span>Address</span></li>
</ul>
</section>
<section class="row">
<label for="name-field">Your Name <span>(Required)</span></label>
<input type="text" class="field" value="" id="name-field" name="name" />
</section>
<section class="row">
<label for="name-field">Phone Number <span>(Required)</span></label>
<input type="text" class="field" value="" id="phone-field" name="phone" />
</section>
<section class="row">
<label for="email-field">E-Mail Address <span>(Required)</span></label>
<input type="text" class="field" value="" id="email-field" name="email" />
</section>
<section class="row">
<label for="name-field">Make of Vehicle <span>(Required)</span></label>
<input type="text" class="field" value="" id="make-field" name="make" />
</section>
<section class="row">
<label for="name-field">Model of Vehicle <span>(Required)</span></label>
<input type="text" class="field" value="" id="model-field" name="model" />
</section>
<section class="row">
<label for="name-field">Year of Vehicle <span>(Required)</span></label>
<input type="text" class="field" value="" id="year-field" name="year" />
</section>
<section class="row">
<label for="name-field">Engine <span>(Required)</span></label>
<input type="text" class="field" value="" id="engine-field" name="engine" />
</section>
<section class="row">
<label for="name-field">Transmission <span>(Required)</span></label>
<input type="text" class="field" value="" id="transmission-field" name="transmission" />
</section>
<section class="row">
<label for="name-field">Mileage <span>(Required)</span></label>
<input type="text" class="field" value="" id="milage-field" name="milage" />
</section>
<section class="row">
<label for="name-field">Existing Modifications<span>(Required)</span></label>
<input type="text" class="field" value="" id="mods-field" name="mods" />
</section>
<section class="row">
<label for="message-field">Goals and Expectations <span>(Required)</span></label>
<textarea class="field" id="goals-field" name="goals"></textarea>
</section>
<div class="g-recaptcha"align="Center" data-sitekey="6LdTMwYTAAAAAEP5M0tR5i5GWqcrskfZw7xhvgAK"></div>
<section class="row">
<input type="submit" class="button" value="Submit" />
<p></p>
</section>
</form>
</section>
“解决这场冲突的任何帮助都会很棒。
由于