You are here: Re: Storing array in a row « PHP Programming Language « IT news, forums, messages
Re: Storing array in a row

Posted by Jerry Stuckle on 11/19/25 11:47

guitarromantic@gmail.com wrote:
> Jerry Stuckle wrote:
>
>
>>Since you (probably) have multiple text areas, you can either give them unique
>>names such as 'comment_1', "comment_2', etc. Or, a simpler approach would be to
>>name them all 'comment[]', in which case the $_POST['comment'] will be an array
>>with one element for each text area.
>
>
> Ahh, I'd given them all unique names with the name of the author_id
> attached, so I was wondering how to get that. I didn't think I could
> give them all the same name, thanks for enlightening me!
>

Well, you can also get the name of all values from the $_POST array, i.e.

foreach ($_POST as $key->$value) {
...

Or name then "text1", "text2", etc. and have another hidden variable with each
one such as "staff1", "staff2", etc. which contains the staff id.

Lots of ways to do it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация