Dynamic Forms and Getting data from them

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
robjime
Forum Commoner
Posts: 46
Joined: Sat Apr 03, 2004 12:26 pm
Location: the RO

Dynamic Forms and Getting data from them

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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]
Post Reply