簡體   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