|
Posted by guitarromantic on 05/11/06 04:06
Rik wrote:
> $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)
Thankyou for this, very helpful.
> 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.
Out of a database of about 780 reviews, 65 are multiple authors. I
think it'd be more of a headache to work the other way (plus I can't
really get my head around how I'd have to restructure the database).
> 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?
1. Nope, bad coding on my part. Removed.
2. (It didn't work) Yeah, it's got the values, and the one that ends up
in the db is author[0]. Is there anything special I need to do on the
database field for this data? I just have it as a standard int
currently.
Matt
Navigation:
[Reply to this message]
|