find($id)->first(); $post->title = $title; $post->description = $description; if(!$post->update()){ echo "Error could not update"; }else{ header("location: ../../Frontend/home.php"); } }