Re: [PHP] what wrong in this code ?
Alawi albaity wrote: why the varible value(123) is not printed? 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(); ?> tryagain } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what wrong in this code ?[Scanned]
I think it's to do with the scope of the variable. It will work if you declare the variable as global within the make_login function. Michael Egan -Original Message- From: Alawi albaity [mailto:alawi@;php4web.com] Sent: 13 November 2002 08:13 To: PHPList Subject: [PHP] what wrong in this code ?[Scanned] why the varible value(123) is not printed? tryagain -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php