<?php 
        require_once "DBConfig.php";
 		$id = $_REQUEST['key']; 
		$u = $_REQUEST['u'];
			$sql = "DELETE FROM blog_table WHERE blog_id='".$id."'";
						if ($link->query($sql) === TRUE) 
						{
						echo "<script type='text/javascript'> window.onload = function () { alert('Blog info deleted successfully!');	   					
				window.location.href='Blog.php?u=$u';} </script>"; 
						}
						else 
						{
						
						echo "<script type='text/javascript'> window.onload = function () { alert('Error: Please try again later!');	   					
				window.location.href='Blog.php?u=$u';} </script>"; 
							
						}
?>