im仅试图在提交其他文件的注册按钮时显示页面模式。为了方便起见,将它们称为page1和page2。
第1页:
concurrent.futures
page2:
<?php
if(isset($_POST['register']) && $_POST['register'] == 'REGISTER') {
?>
<script>
$(window).load(function(){
$('#myModal').modal('show');
});
</script>
<?php
}
?>
<!-- The Modal -->
<div id="myModal" class="modal">
<div class="modal-content">
<div class="modal-header">
<span class="close">×</span>
<h2>Welcome, New White Card Holder!</h2>
</div>
<div class="modal-body">
<h3>Congratulations! you are entitled for a 30-day free trial of our <img src="../img/ribbon-elite.png" class="small-icon"> Elite Membership.</h3>
<h3>You may begin browsing our cards right away as soon as you close this window</h3>
<h3>Also, if you wish to avail of our other membership options, <a href="membership.php">click here.</a></h3>
<h3>Enjoy a wealth of deals for wellness!</h3>
<br>
</div>
</div>
</div>
简单地说:
注册在第2页
模式在第1页
第2页成功注册后重定向到第1页
我希望模式成功在page2中注册成功后立即出现在page1中
将已填写的表单保存到数据库时,我的if条件“ if(isset($ _ POST ['register'])&& $ _POST ['register'] =='REGISTER')”有效将对我的“ .modal('show');”执行相同的操作但是当我成功注册时,弹出窗口没有效果或外观。我的显示模式代码有什么问题?