query("SELECT * FROM blogs where title = '".$_POST['title']."'"); if(!($chk->num_rows)) { $image = photo_upload('image','blogs'); if($image['status']==1) { $con->query("INSERT INTO `blogs` (`id`, `timestamp`, `image`, `title`, `description`) VALUES (NULL, CURRENT_TIMESTAMP, '".$image['file_name']."', '".$_POST['title']."', '".$_POST['description']."')"); echo ''; } } } if($_GET['action']=='del') { if(file_exists("../uploads/blogs".$_GET['file'])) unlink("../uploads/blogs".$_GET['file']); $con->query("DELETE FROM blogs where id = '".$_GET['id']."'"); echo ''; } ?>

Dashboard Control panel

Add Blog

List Blogs

query("SELECT * FROM blogs"); while($g = $get->fetch_assoc()) { echo ''; } ?>
Blog Title Blog Image Remove
'.ucwords($g['title']).'