RE: Passing a list in the Header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Not sure why you need to pass it in the header as apposed to the body, since
html provides the following;

--------------------- snip
<form action="postpgm.php" method=post>
<input type="hidden" name="arrayvalue[0]" value="value0">
<input type="hidden" name="arrayvalue[1]" value="value1">
<input type="hidden" name="arrayvalue[2]" value="value2">
--------------------- snip

And in the form postpgm.php

$receivedarray = $_POST["arrayvalue"];

// $receivearray will be an array type with all the values above.

If I were doing this, I would have chosen PHP sessions to pass this
information since then it can't be modified by the user, and the array
content doesn't need to make the round trip to the browser and back (I have
to pay for my bandwidth).

http://www.php.net/manual/en/ref.session.php

Only arrays I've seen in the header are JavaScript Arrays, and you'd have to
do something special in JavaScript to get them back.

Hope this helps,

Warren Vail

-----Original Message-----
From: Todd Cary [mailto:todd@xxxxxxxxxxxxxxxxxx] 
Sent: Tuesday, November 02, 2004 1:04 PM
To: php-general@xxxxxxxxxxxxx
Subject:  Passing a list in the Header


I need to pass a list (preferably an Array) in the header.  Can this be 
done, and if so, what is the best method?

Also, how do I extract the info on the page that receives the info?

Todd

-- 
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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux