when you submit this form, PHP will give a array variable called $name
you can store in in MySql as:
<?
// will make the $name as a comma seperated string
$str = join(",", $name);
insert into tablename(id, value) VALUES(null, '$str');
?>
now to reget the array, you can select it back from MySql and split it as:
<?
$name = split(",", $str);
?>
//elias
"Matthew Delmarter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> I want to store the results of a multiple select input box in a mysql
> db. The box looks like this:
> <select name='name[]' size='5' multiple>
> <option value='id'>name</option>
> </select>
>
> I cannot seem to store the array in a database and then output the
> result using foreach. Any tips?
>
> Regards,
>
> Matthew Delmarter
> Web Developer
>
> AdplusOnline.com Ltd
> www.adplusonline.com
>
> Phone: 06 8357684
> Cell: 025 2303630
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]