Jump to content

Archived

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

russia5

Select Fields in Hidden Variables

Recommended Posts

I have a multipart form.  The first page has data input including Select fields.  To my knowledge, you can not pass arrays through as Hidden Fields.  This being the case, how do you pass the Select Drop down list through as hidden variables?

Share this post


Link to post
Share on other sites
You have to serialize the array, pass that, and unserialize it in the recieving script.

Example:
In your form:
[code]
<input type="hidden" name="somename" value='<?php echo serialize($_POST['dropdown']); ?>'>
[/code]
In the processing script:
[code]
$somename = unserialize($_POST['somename'];
[/code]

Ken

Share this post


Link to post
Share on other sites

×

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.