Marking messages as read when user visits their inbox
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
require 'common.php';
|
require 'common.php';
|
||||||
require 'loginRequired.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">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|||||||
Reference in New Issue
Block a user