russia5 Posted August 29, 2006 Share Posted August 29, 2006 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? Link to comment https://forums.phpfreaks.com/topic/18998-select-fields-in-hidden-variables/ Share on other sites More sharing options...
kenrbnsn Posted August 29, 2006 Share Posted August 29, 2006 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 Link to comment https://forums.phpfreaks.com/topic/18998-select-fields-in-hidden-variables/#findComment-82112 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.