Posted by Mike on 10/25/97 11:34
I finally got serialize to work but now I cannot get unserialize to work. Here is my code.
$settings = serialize($settings_array);
echo "<INPUT TYPE='Hidden' NAME='settings' VALUE='".$settings."'>";
$settings = $_REQUEST['settings'];
echo "<P>us=".$settings;
$settings_array = Array();
$settings_array = unserialize($settings);
//if($debug) {
echo "<P> SETTINGS ARRAY <P>";
print_r($settings_array);
echo "<P>";
//}
$settings shows the unserialized data.
us=a:3:{s:2:\"id\";s:1:\"0\";s:5:\"fname\";s:1:\"x\";s:5:\"lname\";s:1:\"x\";}
but nothing is showing up for the array $settings_array when I do a print_r.
Where have I gone wrong? All help is appreciated. Thanks.
Mike
[Back to original message]
|