/**
  * Updates the address
  */
 public function updateAction()
 {
     $this->render('editContact');
     if (isset($_POST['submit'])) {
         $addressbook = new AddressBook($_POST);
         $error = $addressbook->validate();
         $result = $addressbook->editAddress();
         if ((isset($error['errorFlag']) && $error['errorFlag']) === true) {
             $error = implode(",<br/>", $error['errorMsg']);
         } elseif ($error['errorFlag'] === false) {
             if ($result === true) {
                 echo "<script>alert('Successfully updated!');</script>";
                 $this->redirect('Contacts', 'list');
             }
         }
     }
 }