On Sunday 28 October 2001 22:17, Imar de Vries wrote:
> Hi all,
>
> a very frustrating problem. For some reason I am not able to pass on an
> array between two functions, although I declare it global in both of
> them. I suspect my use of a switch statement to control the flow of the

[...]

> switch ($action) {
>  default:
>  main();
>  break;
>  case "test_one":
>  test_one();
>  break;
> }

[...]

>  print ("<p><form method=\"post\" action=\"arraytest.php\"
> enctype=\"multipart/form-data\">");
>  ?>
>  <input type="hidden" name="action" value="test_one">
>  <input type="submit" value="Test" tabindex="6">
>  </form>
>  <?
> }


So you want to share the array across *requests*
That doesn't have *anything* to do with "global".

Have a look at how HTTP works - each request is an isolated execution of 
a PHP script. it doesn't have any idea of what other pages the user 
already looked at. To archieve your stuff you need session management 
(phpbuilder.com has a nice tutorial on this)

-- 
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)

This is JohnC IMHO, I compaired tri-word groupings here and in his plan
and got a good match.

- /. posting discussing the likelihood that an AC post that claimed to be
posted by John Carmack during his honeymoon (and having the login info at
home) was actually from him.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to