title = $title; $post->description = $description; //Call the save function. if(!$post->save()){ echo "Failed to save the post"; exit(); }else{ header("location: ../../Frontend/home.php?Post=UploadSuccess"); } }