From 3f9787538ac31403cc1684da333f63f348c1f50c Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Wed, 4 Dec 2019 19:23:26 -0500 Subject: [PATCH] Marking messages as read when user visits their inbox --- var/www/messagesInbox.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/www/messagesInbox.php b/var/www/messagesInbox.php index 353b6b2..4c3a29b 100644 --- a/var/www/messagesInbox.php +++ b/var/www/messagesInbox.php @@ -1,6 +1,12 @@ exec("UPDATE messages SET haveread='Y' WHERE recipient='".$_SESSION["loggedInUser"]."'"); + }catch(PDOException $e){echo "PDOException: ".$e->getMessage(); + }catch(Exception $e){echo "Exception: ".$e->getMessage(); + } ?>