Re: "global" variables

From: Date: Mon, 01 Mar 2004 17:30:18 +0000
Subject: Re: "global" variables
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-33236@lists.php.net to get a copy of this message
Richard Davey wrote:
You don't check $v_dec in your manage.php script though, you check to see if $page_no is set which it never will be, because no-where do you give it a value.
Thanks Davey, but is $page_no not set every time (see below) or did you mean that I must rather use $v_dec["page_no"] in the code? if(!isset($page_no))
     {
     $page_no = "login";
     }
$page_no is set to "login" if(!(login_status($session_id)) == 1) { $page_no = "login"; } $page_no is set to "login" if(($user_pid != false) && (login_status($user_pid) == false))
               {
               login($user_pid, $session_id);
               $res_login = 1;
               $page_no = "start_select";
If login ok then $page_no is set to "start_select". if(!($page_no == "login")) switch { case...: $page_no="new value"} Torsten

« previous php.db (#33236) next »