You are here: unserialize « PHP Programming Language « IT news, forums, messages
unserialize

Posted by Mike on 10/26/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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация