Posted by mantrid on 10/17/06 13:24
"Rik" <luiheidsgoeroe@hotmail.com> wrote in message
news:b36e8$45342334$8259c69c$21229@news1.tudelft.nl...
> mantrid wrote:
> > Im using arrays generated from my records displayed in a table on my
> > site to update the corresponding records in a mysql database ie
> >
> > on the web page
> > col1 col2 col3
> > 1 2 2
> > 1 6
> > 2 7 4
> >
> > which I post to next page as col1array col2array col3array problem is
> > some of the fields in the site's table are blank
> > so the arrays are not in sync
>
> Which YOU control, you can make them in sync.
> As I understand it, you could make the HTML something like (pseudo-code):
>
> Row1 <input name="col1[1]" /><input name="col2[1]" /><input name="col3[1]"
> />
> Row2 <input name="col1[2]" /><input name="col2[2]" /><input name="col3[3]"
> />
>
> Which will keep your POST array in sync.
>
> Even better would be
> Row1 <input name="records[1][]" /><input name="records[1][]" /><input
> name="records[1][]" />
> Row2 <input name="records[2][]" /><input name="records[2][]" /><input
> name="records[2][]" />
>
> Which will have all your fields in nice arrays per row already
> (print_r($_POST); to check this).
>
> Grtz,
> --
> Rik Wasmus
>
>
Thanks
The second solution looks like what Im lookin for in the long term. Have
used flamers quick fix for the moment until i can spend some time on the
problem.
[Back to original message]
|