|
Posted by Rik on 05/11/06 03:47
guitarromantic@gmail.com wrote:
> I wanna make a multiple select form
> so we can just select all the contributors and have the values saved
> in the database - in one row (something like "56,34,21" etc).
$author = implode(',',$_POST['author']);
And if you'd need to extract it all again:
$authors = explode(',',$author);
(assuming there is no ',' in the $Staff_id)
Allthough, if it becomes a common habit, maybe an extra table will be
preferred. It would make handling data on the database side somewhat easier.
If this doesn't work:
1. Did you deribately set action='' in your form?
2. print_r($_POST), does your $_POST['author'] contain the values?
Grtz,
--
Rik Wasmus
[Back to original message]
|