[EMAIL PROTECTED] wrote:

apologies i generally use this system for deleting records, i give a
confirm box if they press ok it goes to another action, i suppose i should
change this system to submit the form instead and check for the post var ?
i guess at least it could store the http_referer then :\

If you're talking about presenting a list of records and using a button to delete a record, then you should use a method such as this...


<input type="submit" name="delete[xx]" value="Delete">

Where "xx" is the record_id (or equivalent). Then, when the form is submitted, you just look for $_REQUEST['delete'], make sure it's an array, grab the key using key(), and delete that record.

Simple, eh? :)

If you want an easy method for presenting a list of records and radio buttons for each record with different statuses (like open, closed, pending, delete, etc), and handling the status changes, check out my column in the latest issue of php|architect. :)

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to