passing an array
You have several possibilities, which all has advantages and disadvantages.
- save in cookie
- save in session
- send in a form
- send as parameter in a link
You have to think first about the sensitivity of the information you pass to next page, is it important that no one can tamper with the information ? .. if so, you can rule out cookie, form or link.
Do you only need info once or through out the whole user session ?
usually Sessions and cookies are used for persistant information, and forms and d parameters sent via link are used for inforrmation that are just pased from one page to another.
Anyway, a convenient method for passing the array is first turning array into a string, using a delimiter to separate each of the components of the array.:
$comma_separated = implode(",", $array);
Then on the next page you turn it into an array again:
$array_again = explode(",", $comma_separated);
The string can either be sent in a hidden filed in a form, or as parameter on a link. The last you might need to URLencode it.
also if security is an issue, you could add a checksum of a kind to array passed, and check for consistancy on the next page.
hope that this helps you...
kind regards
/sonny