Hi there,
simple problems have complex solutions.here's the answer to ur querry:
1. In page1.php
.......
$array_to_be_passed[]= "data";
.......
<form action=page2.php>
<input type=hidden name=array_to_pass value='serialize($array_to_be_passed)'>
.......
</form>
ps: remember to send the value in ('') single quotes bcoz if u use ("") then the serialized data doesnt pass.(echo the serialized data, it will have " to seperate the data elements).
2.page2.php
global $array_to_pass ;
$array_to_pass = unserialize(stripslashes($array_to_pass));
for ($i=0; $i< sizeof($array_to_pass); $i++)
echo $array_to_pass[$i];
this will echo u the whole array passed as a hidden field from page1.php.
ps: the array which was serialized in page1.php has slashes. so stripslashes was used in page2.php. again, the whole serialized data is to be deserialized, which restores the array, stored in $array_to_pass.
Happy programmin
Bhushan-Lalit