Jump to content

Loading an array into another page.


thangappan

Recommended Posts

See the following files.

 

File: testing.php

$table_name = 'project.contact_detail';

$attributes = array( "First Name" => "first_name", "Last Name" => "last_name","Email" => "email", "Phone" => "phone","Fax" => "fax","Comment" => "comment","Topic" => "CONTACT DETAILS");

$string=http_build_query(array('attr'=>$attributes,'table' =>$table_name));

 

print_r($attributes); // It prints correctly.

echo "<script language=\"javascript\"> window.location = \"Pagination.php?Value=$string\";</script>\n";

 

File2: Pagination.php

 

if($_GET['Value']){

 

print_r($_GET['attr']);

}

 

It prints following result.

"Last Name" => "last_name","Email" => "email", "Phone" => "phone","Fax" => "fax","Comment" => "comment","Topic" => "CONTACT DETAILS");

 

Why the first value will be skipped?

 

Link to comment
https://forums.phpfreaks.com/topic/143435-loading-an-array-into-another-page/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.