繁体   English   中英

细分和重定向后如何引导模式弹出窗口

[英]How to bootstrap modal popup after submmision and redirect

您好我有联系我们页面

<form id="contact_form" action="sendmail.php" method="POST" enctype="multipart/form-data">
    <div class="row">
        <label for="name">Your name:</label><br />
        <input id="name" class="input" name="name" type="text" value="" size="30" /><br />
    </div>
    <div class="row">
        <label for="email">Your email:</label><br />
        <input id="email" class="input" name="email" type="text" value="" size="30" /><br />
    </div>
    <div class="row">
        <label for="message">Your message:</label><br />
        <textarea id="message" class="input" name="message" rows="7" cols="30"></textarea><br />
    </div>
    <input id="submit_button" type="submit" value="Send email" />
</form> 

我这样发送mail.php

<?php
if(isset($_POST['email'])) {
    $subject = "Contact Us Form";
    $name = $_POST['name']; // required
    $email_from = $_POST['email']; // required
    $Enquiry=$_POST['message']; // required
    $message = '<html><body>';
    $message .= '<img src="http://inncrotech.com/migration/wp-content/uploads/2017/01/LGD4.png" alt="Website Change Request" />';
    $message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
    $message .= "<tr style='background: #eee;'><td><strong>Name:</strong> </td><td>" . strip_tags($name) . "</td></tr>";
    $message .= "<tr style='background: #eee;'><td><strong>Email:</strong> </td><td>" . strip_tags($email_from) . "</td></tr>";
    $message .= "<tr style='background: #eee;'><td><strong>Enquiry:</strong> </td><td>" . strip_tags($Enquiry) . "</td></tr>";
    $message .= "</table>";
    $message .= "</body></html>";
    $to = "somone@edgemigration.com.au";
    $header = "From:team@inncrotech.site \r\n";
    $header .= "MIME-Version: 1.0\r\n";
    $header .= "Content-type: text/html\r\n";
    $retval = mail ($to,$subject,$message,$header);
    if( $retval == true ) {
        header('Location: http://abc.website/contact-us?status=success');
    }else {
        header('Location: http://abc.website/contact-us?status=fail');
    }
}
?>

我在这样的联系我们表格上显示成功消息

<?php
$status=$_GET['status'];
if($status=='success') 
{
?>
<p style="color: green;background-color: #DFF2BF;text-align:center;">
    <?php echo 'Email sent';  ?></p>
<?php } ?>

我想在“联系我们”页面上显示引导模式弹出窗口

请帮助我,在此先感谢

您想在页面上使用引导模式,但是正在为其编写普通的html结构。

如果需要模型,则必须编写引导程序模态结构。

请检查此链接。

http://getbootstrap.com/javascript/#modals

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM