if (isset($_POST["save"])):

   $update->bindParam(':title', cleanMe($_POST['title']));
   $update->bindParam(':text', cleanMe($_POST['text']));
   $update->bindParam(':catid', cleanMe($_POST['catid']));
   $update->bindParam(':status', cleanMe($_POST['status']));
   $update->bindParam(':id', $id);
   $update->execute();
   $update = $database->prepare('update tm_pages set title= :title, text= :text, catid= :catid, status= :status where id= :id');
   
   if($update): header("Location:dashboard.php?section=pages&msg=success#pages");
      else:
      header("Location:dashboard.php?section=pages&msg=error#pages");
   endif;
endif;