prepare("INSERT INTO reports (author, title, description) VALUES (:user_id, :title, :description)") : $conn->prepare("UPDATE reports SET title=:title, description=:description WHERE id=:report_id"); if($_POST['id'] == "") { $query->bindParam(':user_id', $_SESSION['user_id']); } else { $query->bindParam(':report_id', $_POST['id']); } $query->bindParam(':title', $_POST['title']); $query->bindParam(':description', $_POST['description']); if($query->execute()) { echo "