You are here: Re: Question about forms « All PHP « IT news, forums, messages
Re: Question about forms

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация