Page 1 of 1

Dynamic Forms and Getting data from them

Posted: Fri Mar 17, 2006 6:46 pm
by robjime
I have a script that creates several textareas, one per each image that is uploaded in a zip file by a user. What i would like to do is get the text from the text areas and match it with the image and bring that info up later. But my problem is that since i don't know the names or the number of text boxes being generated because its based on the number of images uploaded, how do i capture that info and match it with the image?
Heres a snippet:

Code: Select all

<tr><td><img src="<?php echo $image; ?>"></td><textarea></textarea></td></tr>
Thanks in advance

Posted: Fri Mar 17, 2006 7:39 pm
by feyd
name them to correspond to the image in some fashion, but also name them such that when submitted, it'll create an array.

e.g. texts[foo.bar]