View Single Post
  #2 (permalink)  
Old June 28th, 2004, 05:45 PM
BuzzLY BuzzLY is offline
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nice catch... It seems that in an earlier version of reviewarticle.php, we used Javascript to capture the click event of the buttons (such as Delete), and validate the user's intentions. That was removed from reviewarticle.php, but we neglected to fix the text on page 404 (isn't it ironic that 404 is the HTTP response code for "not found?"). In this case, you should do one of two things: 1. Include some sort of javascript code in reviewarticle.php to prompt the user before the article gets deleted, or 2. redirect them to a page requesting if they truly want to delete the article.

Also note... if the article is published, the SQL query will work (return no errors), but the article will not actually get deleted. This can be confusing. But if you look at the Delete query, it only works on those articles where is_published=0. This protects published articles from accidentally being deleted. To successfully delete a published article, you first have to retract it, then delete it.

Michael K. Glass
Author, Beginning PHP, Apache, MySQL Web Development