RE: [PHP] Passing a list in the Header
| From: | Vail, Warren | Date: | Tue, 02 Nov 2004 21:43:07 +0000 |
| Subject: | RE: [PHP] Passing a list in the Header | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-200962@lists.php.net to get a copy of this message | ||
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@aristesoftware.com]
Sent: Tuesday, November 02, 2004 1:04 PM
To: php-general@lists.php.net
Subject: [PHP] 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