I still want to keep using the submit button! after pressing the submit button (on every row), then go to confirm.php. Then the submit buton can be identified. e.g. id='12' and then update the database!
mysql_query("UPDATE table SET Status = 'Confirmed' WHERE id = $id");
I just don't know how to write the submit button with the unique id or name, so that i can update the database!
One way to do this, using strictly PHP is to loop through the POST vars. I am assuming you don't want to use a simple href (href + query string and you can provide any info you want to your script)
Wrap your table in a form. Say, for instance, the process you want to do is a deletion. As you are putting your rows together, enter your input something like so: echo('<input name="Delete' . $Row[ID] . '" type="submit" value="Delete" /> etc ... If you are submitting to the same page (such as action="<?=$_SERVER[PHP_SELF]?>", at the bottom of your form, create a hidden field named "Process". Then, when you submit your form, you can check for if(!empty($_POST) and then do this:
i have a similar problem and i want to do it entirely with php. I can't figure how to combine what happens after i press a button, say "edit row", with the rest of the table holding the info from the db... In other words, I have a form - user writes some data and then it is submitted to the db. Then all the data is printed out in a table each row having a button "edit row". When this button is pressed, the table cells become editable, user changes the name or something and saves the new data (button "edit row" becomes "save").