query("SELECT * FROM designing where name = '".$_POST['title']."'"); if(!($chk->num_rows)) { $image = photo_upload('image','designing'); if($image['status'] == 1) { $con->query("INSERT INTO `designing` (`id`, `timestamp`, `title`, `image`, `description`) VALUES (NULL, CURRENT_TIMESTAMP, '".$_POST['title']."', '".$image['file_name']."', '".$_POST['description']."')"); echo ''; } else { echo ''; } } } ?>