有沒有什麼辦法在PHP中有一個鏈接,以便當用戶點擊鏈接時,他們調用一個函數,然後立即調用該函數後,用戶被重定向到另一個網頁。php鏈接到2件東西
$acceptEmailInvite; //append this url to the url in the link
if($app[UID]) {
//how do I have a link connect to two redirects?
$acceptEmailInvite = '/idx.php/store/accept/'.{$org['id']}; //link to this first
$acceptEmailInvite = 'getLink?org='.$D['bta']; //then link to this
}
<a href="<?php echo $C['tdURL'].$acceptEmailInvite; ?>">Accept the invitation for: <b><?php echo $D['referer']; ?></b></a>
編輯:我的意思是,這兩件事情只發生在鏈接被點擊時。所以用戶不應該被重定向,除非鏈接被點擊。對困惑感到抱歉。
ohhhhh,我認爲這應該做到這一點。謝謝! – BrettG