Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Boostrap弹出模式窗口中的联系人窗体_Php_Html_Twitter Bootstrap_Bootstrap Modal_Contact Form - Fatal编程技术网

Php Boostrap弹出模式窗口中的联系人窗体

Php Boostrap弹出模式窗口中的联系人窗体,php,html,twitter-bootstrap,bootstrap-modal,contact-form,Php,Html,Twitter Bootstrap,Bootstrap Modal,Contact Form,我正在使用引导打开一个模态表单 我真的搞不懂发生了什么事。这段代码在其他项目()中工作,发送邮件没有问题。但是如果我把它复制到我的网站上,就像我的submit按钮没有响应一样,它也不会加载initiate quote.php文件。 这是一个不起作用的实时版本 我的HTML: <button href="#freeQuote" role="button" data-toggle="modal" type="button" class="btn btn-primary btn-lg outl

我正在使用引导打开一个模态表单

我真的搞不懂发生了什么事。这段代码在其他项目()中工作,发送邮件没有问题。但是如果我把它复制到我的网站上,就像我的submit按钮没有响应一样,它也不会加载initiate quote.php文件。 这是一个不起作用的实时版本

我的HTML:

<button href="#freeQuote" role="button" data-toggle="modal" type="button" class="btn btn-primary btn-lg outline" style="font-size:16px;">Free Quote</button>
</center>
<div class="modal fade" id="freeQuote">
<div class="modal-dialog">
<div class="modal-content">
    <div class="modal-header">
        <button class="close" data-dismiss="modal">&times;</button>
            <h3 class="modal-title">FREE Quote</h3>

    </div>
    <!-- close modal-header -->
    <div class="modal-body">
            <h4>Send us a description </h4>
        <hr>
        <form name="contact" method="post" action="quote.php">
            <label for="name">Your Name</label>
            <br>
            <input class="col-md-10" type="text" name="name" class="input-xlarge">
            <br>
            <br>
            <label for="company">Your Company</label>
            <br>
            <input class="col-md-10" type="text" name="company" class="input-xlarge">
            <br>
            <br>
            <label for="email">Your E-mail</label>
            <br>
            <input class="col-md-10" type="email" name="email" class="input-xlarge">
            <br>
            <br>
            <label for="message">Details</label>
            <br>
            <textarea class="col-md-10" name="message" class="input-xlarge"></textarea>
            <br>
            <input class="btn-sm btn-success" type="submit" value="Send!" id="submit">
        </form>
    </div>
    <!-- close modal-body -->
免费报价
&时代;
免费报价
给我们发一份说明书

你的名字


贵公司


你的电子邮件


细节

我的PHP

<?php
$myemail = 'example@gmail.com';
if (isset($_POST['name'])) {
    $name = strip_tags($_POST['name']);
    $company = strip_tags ($_POST['company']);
    $email = strip_tags($_POST['email']);
    $message = strip_tags($_POST['message']);
    echo "<span class=\"alert alert-success\" >Your message has been received. Thanks! Here is what you submitted:</span><br><br>";
    echo "<stong>Name:</strong> ".$name."<br>";   
    echo "<strong>Company:</strong> " .$company . "<br>";
    echo "<stong>Email:</strong> ".$email."<br>"; 
    echo "<stong>Message:</strong> ".$message."<br>";

    //generate email and send!
    $to = $myemail;
    $email_subject = "New Quote form submission";
    $email_body = "You have received a new message. ".
    " Here are the details:\n Name: $name \n ".
    "Email: $email\n Message \n $message";
    $headers = "From: $myemail\n";
    $headers .= "Reply-To: $email";
    mail($to,$email_subject,$email_body,$headers);
}
?>


单击中的按钮会在process.php中发送请求,而不是在qoute.phpcheck控制台日志中发送错误“g未定义”,每当我在您的站点上单击该按钮时,它都会给出一个javascript错误。我猜你页面上的一些js代码阻塞了提交请求。谢谢,这与一些javascript有冲突。