Re: Selecting what's for deletion
| From: | Marek Kilimajer | Date: | Fri, 27 Dec 2002 08:04:38 +0000 |
| Subject: | Re: Selecting what's for deletion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129417@lists.php.net to get a copy of this message | ||
Make the "Delete" button a link with href="delcategory.php?catid=$catid", maybe with additional
information so you can redirect the browser back to where it has been (page #, parent category ...)
Cesar Aracena wrote:
Hi all, I'm making the administration part of a site which handles categories, sub categories and products. Inside the "Categories" part, there's a "List categories" button which gives a list of the categories and sub categories when pressed. Along with each category, there's a "Delete" button that, when pressed, it's supposed to delete that category from the DB. The problem here is that the lists is made dynamically using a FOR loop and is being placed inside a FORM so the action is handled through an ACTION="" tag. Now, the ACTION tag points to a php file which deletes the desired row in the DB. The question is how to tell that php file (through GET or POST) which row to delete... My first shot was to name each "Delete" or submit button inside form like "delcategory?catid=0001" but then the POST wasn't reading that... Any thoughts? Thanks in advance, Cesar L. Aracena icaam@icaam.com.ar caracena@infovia.com.ar (0299) 156-356688 Neuquén (8300) Capital Argentina