McAwesome Posted August 27, 2009 Share Posted August 27, 2009 I've been wondering why this doesn't work, seems simple enough?! Anyways, my idea is to query the users database and compare it. If it doesn't pass it'll redirect to the login.php page. otherwise the page's logic is executed. I wanted the if statement to be in a function and just call the function with the required user parameter. Is this possible? Thank you <?php session_start(); $_SESSION['LoggedIn'] = 1; $_SESSION['ig_username'] = 1; $_SESSION['ig_userlevel'] = 1; if(empty($_SESSION['LoggedIn']) AND empty($_SESSION['ig_username']) AND $_SESSION['ig_userlevel'] >= $input) { die('invalid permission'); } echo 'super, it worked!'; ?> Link to comment https://forums.phpfreaks.com/topic/172070-login-verification-script/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.