Sorry to say but the inelegant solution is the only way I have found how to
do it :(.  I read it on php FAQTs on how to pass arrays on multi-step forms.
This is a very similar thing.  So yes you have to implode the array then
pass it in a hidden field.  Then explode the array after being passed to
form again.  Hope this helps.

-Mike de Libero
[EMAIL PROTECTED]
http://www.soreye.com
----- Original Message -----
From: "John Hughes, Jomari Works" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 18, 2002 5:27 PM
Subject: [PHP-DB] passing array through $PHP_SELF


> I have a page that selects students from a mysql table who meet a certain
> requirement. Those who meet the requirement have a check box variable that
> is "checked." (The other students have the check box, but it is
unchecked.)
>
> The "checked" student id numbers are sent to the next PHP page.  That page
> allows the user to edit the text of a message that will be sent to each of
> the students "checked" on the previous page.
>
> Up to this point I'm fine.  I can pass the array of student ids and read
> them on the other page.
>
> What I want to do is use $PHP_SELF to allow the user to preview the letter
> after editing.
>
> My initial tries haven't worked. If I just submit $PHP_SELF the student id
> array disappears. When I attempt to create a "hidden" form field I get the
> message:
>
> Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
> `T_NUM_STRING'
>
> Right now I have the book open to implode and explode, figuring I can
> translate the array and then pass it back and forth, but that seems rather
> inelegant.
>
> Is there a "simple" way to pass an array when using $PHP_SELF to reload a
> page?
>
> TIA
>
> John Hughes
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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

Reply via email to