Re: what wrong in this code ?

From: Date: Wed, 13 Nov 2002 14:25:18 +0000
Subject: Re: what wrong in this code ?
References: 1  Groups: php.general php.general 
Request: Send a blank email to php-general+get-124219@lists.php.net to get a copy of this message
Alawi albaity wrote:
why the varible value(123) is not printed? <? function is_login(){ session_start(); if (session_is_registered("test") ){ return true; }//end if else{ return false; }//end else }// end is_login() function function make_login(){ you need "global $test;" here
session_start(); session_register('test'); $test = 123; } function Logout(){ session_destroy(); } if (is_login()){ and not here
Global $test; session_start(); echo $test; logout(); }else{ make_login(); ?> <a href="test.php">tryagain</a> <? } ?>


« previous php.general (#124219) next »