Location: PHPKode > scripts > PHPhotoalbum > phphotoalbum/delete_comment.php
<?php
/*************************************************
 * PHPhotoalbum v0.5
 * by: Henning Støverud
 * e-mail: hide@address.com
 * URL: http://www.stoverud.com/PHPhotoalbum/
 *************************************************/ 

session_start(); 

include("config.inc.php");
include("functions.php");


// Accesscheck
if(!$_SESSION['logged_in'])
{
 display_loginform();
 exit;
}


// Connect to database and delete comment
$connection = db_connect();
$query = "DELETE FROM $config[TABLE_COMMENTS] WHERE msg_id='$_GET[id]'";
$result = mysql_query($query);
$count = mysql_affected_rows();
if($count > 0){
   echo "Comment deleted..<br>";
   echo "<a href=\"$_SERVER[HTTP_REFERER]\">Back</a>";
}
else 
 echo "No changes were made..<br><a href=\"javascript:history.back()\">back</a>";


?>





Return current item: PHPhotoalbum