session php4 and include()

From: Date: Mon, 05 Jun 2000 14:49:06 +0000
Subject: session php4 and include()
Groups: php.general 
Request: Send a blank email to php-general+get-1045@lists.php.net to get a copy of this message
Hi, I am trying to make a file ( sess_func.php )containing functions to open a session, verify a session etc... I've got a function create_session($session_name,$array_registered_variables) and a function verify_session($session_name). In the first function, I register the variable id_session session_register("id_session"); $id_session = session_id(); ). My problem is that in the function verify_session() I need to have the value of $id_session and ph does'nt know it. In this function I have done this test : session_is_registered("id_session") --> answer : YES isset($id_session) --> answer : NO If I do the same test in a script ( after include("sess_func.php"); verify_session($name); ) : session_is_registered("id_session") --> answer : YES isset($id_session) --> answer : YES I really don't understand what's happend. Thanks for help. Pierre. PS : sorry for my English I'm french.

« previous php.general (#1045) next »