Re: Delete
| From: | George Babichev | Date: | Sun, 04 Jun 2006 17:30:33 +0000 |
| Subject: | Re: Delete | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237356@lists.php.net to get a copy of this message | ||
Yes, that checkbox idea is exactly what I was thinking about. Exept I have
no idea how my program would tell one checkbox from the other, and delete
the wrong thing...
On 6/4/06, tedd <tedd@sperling.com> wrote:
At 10:53 PM -0700 6/3/06, George Babichev wrote: Thank you for the help guys, but the I guess I kinda have another question. So I do assign an id to each blog post, and it is auto_increment, so in my blog delete page, it would display all the blog title's and a delete button nex to it. So lets say I click delete on the third entry. How would my program know to delete THAT entry and not another one? Your specific question of "how to delete" I am sure other will provide, but consider this idea. If you have a page that shows blog entries, then why not have an admin page that shows exactly the same thing except if has check-boxes next to the posts? And, if you check any of those and click "Submit", then those entries will be deleted from the database -- simple, plus you already have most of the code. :-) I had a similar problem and was designing an admin page that would do the things I wanted (add/delete/alter items) when it dawned on me that all I needed was a check-box and a submit button added to my main display page. As to how to delete and such, you may find this useful: http://www.weberdev.com/get_example-384.html hth's tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com