Redirect Loop Error when using the Header function in PHP -
i having trouble redirecting user page. keep getting error of "redirect loop". know is, unfortunately, not know how fix it. here code $ setup.
//check see if account 'active' if (isset($_session['inactive']) && $_server['php_self'] != 'account-balance.php') { if ($_session['active'] != 'yes') { $_session['inactive'] = true; header('location: account-balance.php'); } } this code in "header.php" include file included on every page. wanting check whether or users account active. if not active, redirect account-balance.php page. link click on, want redirect them account-balance.php page until make payment. possible do?
i figured out. suppose basename($_server['php_self']) current page name.
Comments
Post a Comment