Beispiel #1
0
 public function Edit($post)
 {
     if (isset($post['id']) && is_numeric($post['id']) && isset($post['rating']) && is_numeric($post['rating'])) {
         $db = new MDB();
         $result = $db->editMovie($post['id'], $post['rating']);
         if ($result) {
             header('Location: ./?message=edit-success');
         } else {
             header('Location: ./?message=edit-error');
         }
         exit;
     } else {
         header('Location: ./?message=request-error');
         exit;
     }
 }