|
-
Feb 19th, 2003, 10:35 AM
#1
Thread Starter
Addicted Member
Which submit button was pressed? (OR, Which row to operate on?) [RESOLVED]
I am using PHP to create an HTML form using a table. Each row has a column with buttons labelled EDIT and DELETE. I can name the buttons and their values according to the row they are in. I would like to know which button is pressed to submit the form.
Webmonkey has a way to see if a variable exists, but I haven't found a way to make that work for me in this case.
http://hotwired.lycos.com/webmonkey/...tw=programming
I think the problem is that I need to set some variable to identify which button was pressed to submit the form at the time the button is pressed. I was thinking that JavaScript could help, but maybe it should all be able to be done in PHP.
I am interested in any solution in any language. This must be a typical problem when using databases. How do I allow the user to choose which row(s) to edit or delete (after displaying the rows)?
Or maybe each row would be its own FORM, but that seems like the wrong way.
Last edited by Phenix; Feb 25th, 2003 at 02:28 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|