jmurch Posted August 19, 2009 Share Posted August 19, 2009 I am getting some confusing feedback when trying to send an array within the $_POST array: On site A I am querying a table and get a record set that I use to populate an array: while($get_address_result = oci_fetch_row($s)) { $address_array[] = $get_address_result; } Then I'm posting to a PHP page on server B: <body onload="submitForm()"> <form name="form" id="form" action="https://www.server_b.com/page.php" method="post"> <input type="hidden" name="address_array" value="<? echo $address_array ?>"> </form> </body> If I do a print_r($address_array) at server A the array is fine, 7 rows. If I do a print_r($address_array) or print_r($_POST['address_array']) at server B all I get is 'Array'. If I do a print_r($_POST) at B I get 'Array ( [address_array] => Array'. TIA, Jeff Link to comment https://forums.phpfreaks.com/topic/171042-trouble-reading-an-array-posted-from-another-site/ Share on other sites More sharing options...
taquitosensei Posted August 19, 2009 Share Posted August 19, 2009 try serialize and unserialize <input type="hidden" name="address_array" value="<? echo serialize($address_array); ?>"> $address_array=unserialize($_POST['address_array']); Link to comment https://forums.phpfreaks.com/topic/171042-trouble-reading-an-array-posted-from-another-site/#findComment-902166 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.