Page 1 of 1

changing a login script

Posted: Tue Jun 26, 2007 5:27 am
by m2babaey
SOLVED :wink:
Please have a look on the next post

Posted: Wed Jun 27, 2007 5:34 am
by m2babaey
Hi
Please look at the function below that I include and use it in my protected pages ( that requires login):

Code: Select all

function membersOnly() {
		if (!$_SESSION['logged']) {
			$_SESSION['log_to'] = $_SERVER['REQUEST_URI'];
			die('This page is available only to registered members,
				you have to <a href="login.php">login</a> first, if ' .
				"you haven't" . ' <a href="signup.php">registered</a> ' .
				 'yet you can do that for free.');
		}
	}
This makes the protected pages almost blank to users when they have not logged in. like this:
http://pedia.sys17.net/protected.htm
But it's too bad. and I want it like this:
http://pedia.sys17.net/wantprolikethis.htm
How can I do that?
Thanks