dongmubi4375 2015-05-02 23:26
浏览 33

解析php发送脚本以引用创建的页面

I have read through many topics on this subject here trying many solutions and still have not been able to locate a solution to my problem.

I have a contact page on the site for simple contact form. everything works correctly. click send and you never leave the contact page after sending and the code gives response that email has been sent. Works beautifully. My friend also wanted to create a more comprehensive contact page and call it a "Quote" page. I simply edited the lines of code on both the contact page for additional boxes of info the copped and renamed the php file as send2 and it works as well but with one hang up. it resolves to a blank white php page (I'm guessing by default) letting me know the message was sent.

the following will include the link to the site as well as code for the quote page html as well as 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
";
$body .= "Name: $name
";
$body .= "Phone: $phone
";
$body .= "Email: $email
";
$body .= "Make: $make
";
$body .= "Model: $model
";
$body .= "Year: $year
";
$body .= "Engine: $engine
";
$body .= "Transmission: $transmission
";
$body .= "Milage: $milage
";
$body .= "Mods: $mods
";
$body .= "Goals: 
$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>

Any help in to "resolve this conflict would be awesome.

Thanks

</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂
    • ¥15 wordpress 产品图片 GIF 没法显示
    • ¥15 求三国群英传pl国战时间的修改方法
    • ¥15 matlab代码代写,需写出详细代码,代价私
    • ¥15 ROS系统搭建请教(跨境电商用途)
    • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。
    • ¥20 CST怎么把天线放在座椅环境中并仿真