2013-08-21 88 views
0

我已成功发送警报电子邮件,以处理已过期的事件。从电子邮件中有一个链接可以让用户链接回特定的活动详情。如果用户没有登录,它将重定向到登录页面。一旦登录成功,它将返回到主页。如何在登录后重定向到特定活动页面?成功登录后如何重定向到页面?

 $contractid = $_REQUEST['Contract_ID']; 
$contract_update_url = "contract_updates.php?id=".$contractid; 
$MM_redirectLoginSuccess = "news_mgm.php"; 

if (isset($_SESSION['MM_Username'])){ 

header("Location: " . $MM_redirectLoginSuccess);} 


if(!empty ($contactid)) 
     {  
      header("Location: " . $contract_update_url); 

     } 
     else{ 

     // header("Location: " . $MM_redirectLoginSuccess); 
     header("Location: javascript://history.go(-1)"); 
     } 
    } 
    else { 
    header("Location: ". $MM_redirectLoginFailed); 
    } 

回答

0

首先,您必须将事件(例如事件ID)传递给电子邮件上的链接。

然后,您可以在处理用户登录时保留此事件ID,如果它是OKAY - 按事件ID重定向到事件页面。

相关问题