Question about Configuration Wizards - Passing Variables
Posted: Tue Aug 03, 2010 3:32 am
I'm not a programmer by trade, I don't understand how some things work in the configuration wizards.
When passing collected variables through the wizard, why do I need to serialize array variables but not basic ones?
Example:
$services gets serialized
And then unserialized
I have played around and if I don't serialize then the data does not get passed on. The $address variable seems fine without any serialization.
When passing collected variables through the wizard, why do I need to serialize array variables but not basic ones?
Example:
$services gets serialized
Code: Select all
case CONFIGWIZARD_MODE_GETSTAGE3HTML:
// get variables that were passed to us
$address=grab_array_var($inargs,"address");
$services=grab_array_var($inargs,"services");
$output='
<input type="hidden" name="services_serial" value="'.base64_encode(serialize($services)).'">Code: Select all
case CONFIGWIZARD_MODE_GETOBJECTS:
$address=grab_array_var($inargs,"address","");
$services_serial=grab_array_var($inargs,"services_serial","");
$services=unserialize(base64_decode($services_serial));