Posted by Arjen on 07/19/05 18:08
jj wrote:
> Hello,
>
> I have a page that has X amount of rows which display a couple of input
> boxes. Each one of these rows of data has its own delete button so that the
> user can delete individual rows. There is also a submit button at the
> bottom of the page that gathers all the data from each input box in the
> entire page and saves it to my DB.
>
> 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.
Make the delete button a submit button.
<input name="delterowx" type="submit" id="delterowx"
value="Mybuttonhasthisname">
then update the values and delete rowx and redirect to original page
Or better make a checkbox at each row and delete it if i's checked after
submit. That way you can delete multiple entries
check the $_POST[] array if ur unsure.
Arjen
Navigation:
[Reply to this message]
|