Page 2 of 2

Posted: Wed Apr 12, 2006 12:37 pm
by feyd
the setting in found in php.ini under the session section.

Posted: Wed Apr 12, 2006 12:48 pm
by pedrotuga
thank you ;)

Posted: Wed Apr 12, 2006 12:51 pm
by pedrotuga

Code: Select all

function check_session(){

if ($_SESSION['islogged'] != true){
	die("not logged in!!");
}
what about this... i want to use this function to check user authentication... should i pass the variable by parameter or should i just get it from the $_SESSION array?
Or should i right a little script with this code and include it whenever i want?

Posted: Wed Apr 12, 2006 3:26 pm
by Oren
Whatever you'll do... use '!==' instead of '!='. This way the code is more secure and it should be faster as well 8)