Posted by Janwillem Borleffs on 11/16/06 11:29
onefastmustang wrote:
> Neva mind.. I figured it out.. I had to add stripslashes to this line.
>
> $searchdata = unserialize(stripcslashes($_COOKIE['searchdata']));
>
If you would define the array before assigning values to and serializing it,
you will see that it also works without stripcslashes():
$searchdata = array();
$searchdata['state'] = 'Foo';
$searchdata['country'] = 'Bar';
$searchdata['radius'] = 100;
$searchdata['radius_zip'] = 1000;
$s = serialize($searchdata);
$searchdata = unserialize($s);
print_r($searchdata);
JW
Navigation:
[Reply to this message]
|