Reply to Re: Multiple field Arrays

Your name:

Reply:


Posted by Lars Eighner on 11/05/07 02:53

In our last episode,
<1194213534.765875.294610@d55g2000hsg.googlegroups.com>, the lovely and
talented Kevin Davis broadcast on comp.lang.php:

> Hello,

> I have an quick question.

It is really an HTML question. Look up the input element in
your copy of the spec.

> I have the following form:

><form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" >
><?php linecount = 5 ?>
><?php
> for (i=0; i< linecount;i++)
> {
><input type="text" name[] value=field1>
><input type="text" name[] value=field2>
><input type="text" name[] value=field3>
><input type="text" name[] value=field4>
><input type="text" name[] value=field5>
><input type="text" name[] value=field6>
> }
></form>

> Then I try to split up the data:
> foreach ($_POST['name'] as $namef)
> {
> echo $namef."<br/>;

> }

> Here is the problem. The multiple fields seem not to be splitting up
> because the output seems to coming out in a single blob.

> What I would like to do is split up the array based upon the field
> entry so I can insert the info into the database.

> Thank you.

> Kevin

--
Lars Eighner <http://larseighner.com/> <http://myspace.com/larseighner>
Countdown: 442 days to go.
What do you do when you're debranded?

[Back to original 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

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