diff options
author | Camil Staps | 2016-07-27 21:06:48 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-27 21:06:48 +0200 |
commit | 390251ac43ca889a318369342b4663ef928349d8 (patch) | |
tree | b2b0a68dd6fccf6fa52d2c1fc95bdd70811a60b3 /include/contacts.php | |
parent | Discount: use Model (diff) |
Contact: use Model
Diffstat (limited to 'include/contacts.php')
-rw-r--r-- | include/contacts.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/contacts.php b/include/contacts.php index 1231e24..28656c9 100644 --- a/include/contacts.php +++ b/include/contacts.php @@ -46,7 +46,7 @@ require('./header.php'); $id = (int) $_GET['id']; try { $contact = new Contact($_pdo, $id); - $header = "<a href='".Constants::url_external."contacts'>Contacts</a> / {$contact->getName()}"; + $header = "<a href='".Constants::url_external."contacts'>Contacts</a> / {$contact->name}"; $show_individual = $id; } catch (PDOException $e) { $alert = "<div class='alert alert-danger alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The contact with id $id</i> could not be found.</div>"; @@ -66,9 +66,9 @@ require('./header.php'); try { $contact = new Contact($_pdo, $id); if ($contact->delete()) { - echo "<div class='alert alert-success alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The contact with name <i>{$contact->getName()}</i> has been removed.</div>"; + echo "<div class='alert alert-success alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The contact with name <i>{$contact->name}</i> has been removed.</div>"; } else { - echo "<div class='alert alert-warning alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The contact with name <i>{$contact->getName()}</i> could not be removed. Perhaps it's already removed?</div>"; + echo "<div class='alert alert-warning alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The contact with name <i>{$contact->name}</i> could not be removed. Perhaps it's already removed?</div>"; } } catch (PDOException $e) { echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The contact could not be removed due to a PDO error.</div>"; |