|
Posted by JDS on 07/19/05 19:44
On Tue, 19 Jul 2005 10:44:44 -0400, jj wrote:
> The problem is that the delete buttons do not work since the form action is
> always triggered for the submit button, as its form tags are nested within
> pretty much the whole page. How would i go about getting my delete buttons
> working while still having the submit button? thanks.
What I would consider is making each Delete button unique somehow. Are
they submit buttons? (input type=submit) If yes, you can try the following:
(Assuming $row_id == 4)
<input type="submit" name="submit" value="Delete Item <?php echo $row_id ?>">
for each "delete" button.
Your processing script will only receive the value of ONE submit button.
One. So process submit or delete based on which submit was sent. In this
case, $_REQUEST['submit'] == "Delete Item 4".
Or you can change the name of the submit button variable, but it gets a
little harder to find.
Well, you could give a name="submit" to the actual submit button and a
name="delete" to all the delete buttons.
Some variation on this theme is what I am hinting at.
later...
--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/
Navigation:
[Reply to this message]
|