Posted by Jerry Stuckle on 11/04/07 23:22
Kevin Davis wrote:
> Hello,
>
> I have an quick question.
>
> 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
>
>
Oops, pressed send too quick...
Also, your fields should be:
<input type="text" name="name[]" value=field1>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|