if (isset($_POST['title']) && isset($_POST['body']) && isset($_POST['category']) && isset($_POST['userfile'])){
$title = htmlspecialchars(trim($_POST['title']));
$body = htmlspecialchars(trim($_POST['body']));
$userfile = $_FILES['userfile'];
$category = $_POST['category'];
}