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

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -