Say I have three pages in the wizard: 1. select recipients from a list thru checkboxes
These recipients are passed on as $recipients
2. write the email (subject, message)
This is passed on as $subject, $message and the $recipients as a hidden field in the form <input type=hidden name='recipients' value='$recipients'>
3. the actual mailer-page.
Which needs $subject, $message and $recipients
On the last page I get strange errors because it can't read the $recipients anymore. All it writes is 'Array'. And that's it. How do I pass on my Array completely so it can be read thru out the mail-wizard?
I can print $recipients in the second window (foreach statement), but I can't print it in the third window. I've also tried to pass it on as <input type=hidden name='recipients[]' value='$recipients'>
I know how to break it up...
Like it read in the first message, I'm already using the for each statement. However, this gives the error.
My question remains:
in the second window the $recipients is still valid and can be used in a for each statement... however, when I post it to the third window: php won't let me use it.
You either need to use a foreach statement to give each recipient it's own hidden input, or on the second page you need to make the reciepients one variable seperated by commas, and on the third page, explode it back into an array (what Harry said).
Bookmarks