Marking messages as read when user visits their inbox

This commit is contained in:
WilliamMiceli
2019-12-04 19:23:26 -05:00
parent b0c8b9debf
commit 3f9787538a

View File

@@ -1,6 +1,12 @@
<?php
require 'common.php';
require 'loginRequired.php';
try{
$db_connection->exec("UPDATE messages SET haveread='Y' WHERE recipient='".$_SESSION["loggedInUser"]."'");
}catch(PDOException $e){echo "PDOException: ".$e->getMessage();
}catch(Exception $e){echo "Exception: ".$e->getMessage();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">