delete.php -- confirm the user wants to delete an article
 Copyright (c) 2005 Ephox Corporation. All rights reserved.
 See license.txt for license agreement
// include the database wrapper functions
// get the article id
$articleID = $HTTP_GET_VARS["article_id"];
// Attempt to establish a connection with the database
if (DBConnect() == FALSE) {
       print DBError();
} else {
   //SQL query to get required document from the database
   DBQuery("SELECT * FROM articles WHERE article_id = " . escape_string($articleID) . ";");
   if (DBFetchRow()) {
//Display the article information in a form asking for delete confirmation
<TITLE>Delete Article ID <?=htmlspecialchars($articleID)?>?</TITLE>
<LINK rel="stylesheet" href="sample.css">
<H1>Delete a Document</H1>
<P>Are you sure you wish to delete this article?</P>
<TD>Article ID:</TD>
<FORM action="xt_delete.php" method="GET">
<INPUT type="hidden" name="article_id" value="<?=htmlspecialchars($articleID)?>">
<P><INPUT type="submit" value="Delete"> <INPUT type="button" value="Cancel" onclick="javascript:history.back();"></P>
   } else {
      //There are no records matching this article_id
      //TODO: Handle and display meaningful error