Code: Select all
$deletQuery = "DELETE FROM ".$settings['tbl_articles']." WHERE ID = ".$HTTP_GET_VARS['id'];
if ($result = $connector->query($deleteQuery))
{
header("Location: index.php");
}
else
{
echo "DELETE FROM ".$settings['tbl_articles']." WHERE ID = ".$HTTP_GET_VARS['id'];
echo('<center>Sorry, there was an error deleting from the database</center>');
}
The section of code used for the actual query is:
Code: Select all
// Execute a database query
function query($query)
{
$this->theQuery = $query;
return mysql_query($query, $this->link);
}