[PHP] Fetching the values from previous page

2002-02-25 Thread Batara Kesuma

Hi all,

I have a page that post a lot of variables to the next page. It looks
like:






one
two
three





On next.php I can access all the values through: $f_text1, $f_text2, and
an array $f_multiple1. My question is, how can I pack all of these
variables from previous page _without_knowing_ the variables name? I mean,
I know I can write:

$array = array("text1" => $f_text1, "text2" => $f_text2, "multiple1" =>
array($multiple1));

But that is not what I want, it is more like:
GetAllFromPrevious();

or in Perl:
%params = $q->Vars;

And poof, all the values from previous will be inserted into an array.

Thanks,
--bk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Fetching the values from previous page

2002-02-25 Thread Steven Walker

Dear Batara,

There are global variables that serve this purpose. You must have 
register_globals turned on:

http://www.php.net/manual/en/language.variables.predefined.php
$_POST
An associative array of variables passed to the current script via the 
HTTP POST method. Automatically global in any scope. Introduced in PHP 
4.1.0.

I believe that you can also use getenv() if the register_globals is not 
on.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Monday, February 25, 2002, at 09:48  AM, Batara Kesuma wrote:

> Hi all,
>
> I have a page that post a lot of variables to the next page. It looks
> like:
>
> 
> 
> 
>
> 
> one
> two
> three
> 
>
> 
> 
>
> On next.php I can access all the values through: $f_text1, $f_text2, and
> an array $f_multiple1. My question is, how can I pack all of these
> variables from previous page _without_knowing_ the variables name? I 
> mean,
> I know I can write:
>
> $array = array("text1" => $f_text1, "text2" => $f_text2, "multiple1" =>
> array($multiple1));
>
> But that is not what I want, it is more like:
> GetAllFromPrevious();
>
> or in Perl:
> %params = $q->Vars;
>
> And poof, all the values from previous will be inserted into an array.
>
> Thanks,
> --bk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Fetching the values from previous page

2002-02-25 Thread Batara Kesuma

On Mon, 25 Feb 2002 10:04:07 -0800
Steven Walker <[EMAIL PROTECTED]> wrote:

> Dear Batara,
> 
> There are global variables that serve this purpose. You must have 
> register_globals turned on:
> 
> http://www.php.net/manual/en/language.variables.predefined.php
> $_POST
> An associative array of variables passed to the current script via the 
> HTTP POST method. Automatically global in any scope. Introduced in PHP 
> 4.1.0.

Steven,

Thank you for the URL, since I am on 4.0.6 I think I will use:
$HTTP_POST_VARS
An associative array of variables passed to the current script via the
HTTP POST method.

$HTTP_GET_VARS
An associative array of variables passed to the current script via the
HTTP GET method.

--bk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Fetching the values from previous page

2002-02-26 Thread Ford, Mike [LSS]

> -Original Message-
> From: Steven Walker [mailto:[EMAIL PROTECTED]]
> Sent: 25 February 2002 18:04
> 
> There are global variables that serve this purpose. You must have 
> register_globals turned on:

Actually, no -- that's the wrong way round.  The associative arrays are always there 
-- it's the individual variables matching the form fieldnames that need 
register_globals.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php