Page 1 of 1

Form submission dynamic

Posted: Fri Nov 21, 2003 5:42 am
by inor.y
I am new in PHP.

I use Macromedia Dreamweaver MX for PHP and MySQL.

I have a form that shows rows of record from a database. Each row has a button and a text entry. I wanted to submit the form but cannot determine what row was clicked, how do we do that?

Roni Joven

Posted: Fri Nov 21, 2003 6:43 am
by m3mn0n
Does each of those rows have their own unique ID number within the database?

If so, display that value within your checkbox/whatever and then when you parse the next page, simply make an SQL statement do whatever you wish WHERE id="$id".

Hope it helps.

Posted: Fri Nov 21, 2003 11:35 am
by microthick
1) You could design your page so that each row is a new form, then have a hidden field called id that contains the unique row identifier.

2) Or, you can creatively give names to those submit buttons, so that they are called submitButton120 then submitButton121, then just parse out the number at the end of the name so you can do your queries properly.