我有一個問題,這可能是非常基本的。鏈接在一個PHP字符串
我有一個簡報從我的index.php提交。 它是一個第三方系統(免費),非常好,在它的管理員/設置有以下字符串:管理員/設置
相關的字符串(返回頁面中的通訊提交按鈕):
index.php?page=mail&
因此,它將我發回索引頁,然後有一些更新並確認我訂閱了新聞快遞的php腳本。
我做了一個彈出div與其他人的幫助工作(只要我給予信貸),其中包括我的通訊php驗證碼。
目前只顯示在屏幕上點擊:
<a href="#" class="topopup">Popup</a>
這是我想從相對字符串index.php頁面=郵件&自動彈出,所以我可以去除彈出代碼? ahref =#class = topup鏈接。
<div id="toPopup">
<div class="close"></div>
<span class="ecs_tooltip">Press Esc to close <span class="arrow"></span></span>
<div id="popup_content"> <!--your content start-->
<h2 align="center">All Coles Newsletter System</h2>
<h3 align="center">bringing News, Birthdays, Events and Invites to your mailbox!</h3>
<hr align="center" width="75%">
<p style="text-align:center"> <?php
if(isset ($_GET['page']))
{
if ($_GET['page'] == "mail")
{
include("maillist/mailmain.php");
}
if ($_GET['page'] == "about")
{
include("about.php");
}
}else {
print("THIS IS WHERE THE PHP NEWSLETTER CONFIMATION UPDATES");
}
?> </p2>
<hr align="center" width="75%">
<p style="text-align:center; font-size: 12px;">
<font style="text-decoration:underline; font-weight:bold;">TIP</font>
: Remember to check your Junk Mail, and add '[email protected]' to your
<font style="text-decoration:underline; font-weight:bold;">SafeSenders</font>
list.</p>
</div>
</div>
<div class="loader"></div>
<div id="backgroundPopup"></div>
還有一個JS加載。
jQuery(function($) {
$("a.topopup").click(function() {
loading(); // loading
setTimeout(function(){ // then show popup, deley in .5 second
loadPopup(); // function show popup
}, 500); // .5 second
return false;
});
/* event for close the popup */
$("div.close").hover(
function() {
$('span.ecs_tooltip').show();
},
function() {
$('span.ecs_tooltip').hide();
}
);
$("div.close").click(function() {
disablePopup(); // function close pop up
});
$(this).keyup(function(event) {
if (event.which == 27) { // 27 is 'Ecs' in the keyboard
disablePopup(); // function close pop up
}
});
$("div#backgroundPopup").click(function() {
disablePopup(); // function close pop up
});
/************** start: functions. **************/
function loading() {
$("div.loader").show();
}
function closeloading() {
$("div.loader").fadeOut('normal');
}
var popupStatus = 0; // set value
function loadPopup() {
if(popupStatus == 0) { // if value is 0, show popup
closeloading(); // fadeout loading
$("#toPopup").fadeIn(0500); // fadein popup div
$("#backgroundPopup").css("opacity", "0.7"); // css opacity, supports IE7, IE8
$("#backgroundPopup").fadeIn(0001);
popupStatus = 1; // and set value to 1
}
}
function disablePopup() {
if(popupStatus == 1) { // if value is 1, close popup
$("#toPopup").fadeOut("normal");
$("#backgroundPopup").fadeOut("normal");
popupStatus = 0; // and set value to 0
}
}
/************** end: functions. **************/
}); // jQuery End
我的形式是一個單獨的PHP文件:
<?php include("globals.php"); ?>
<form action="<?php echo $website.$relative_string;?>" name="subscribe" onsubmit="javascript:return checkEmail(this);" method="post">
<div id="cell8" class="titlecell2"><h3>Email:</h3></div>
<div id="cell9" class="inputcell2">
<input type="text" class="inputfield2" name="email" value="Your Email..." id="email2" maxlength="255" onfocus="this.value='';">
</div>
<div id="cell10" class="textcell3">
<input name="group" type="hidden" id="group[]" value="<?php echo $group; ?>">
<input name="subscribe" id="sub" type="radio" value="true" checked>
</span>Subscribe</p>
</div>
<div id="cell11" class="buttoncell">
<button type="submit" name="Submit2" value="Join" id="submitButton2">
<span>Join</span>
</button>
</div>
<div id="cell8" class="textcell4">
<input type="radio" name="subscribe" id="unsub" value="false">
</span>Un-Subscribe</p>
</div>
</form>
<script>
var sub = document.getElementById('sub');
var unsub = document.getElementById('unsub');
var btn = document.getElementById('submitButton2');
sub.onchange = function() //When sub changes
{
if(sub.checked) //If it's checked
{
btn.innerHTML = "<span>Join</span>";
}
else // If not..
{
btn.innerHTML = "<span>Leave</span>";
}
}
unsub.onchange = function() //When unsub changes
{
if(unsub.checked) //If it's checked
{
btn.innerHTML = "<span>Leave</span>";
}
else // If not..
{
btn.innerHTML = "<span>Join</span>";
}
}
btn.onclick = function()
{
popupClick();
}
</script>
這就是很多!
你彈出重定向在哪裏? – Mani
感謝您的關注瑪尼,我更新了我的文章。 – Smokey
您在同一頁面中彈出$ _GET ['page']或$ _REQUEST ['page']將獲得價值,您不需要通過url發送價值。 – Mani