Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 29th, 2012  |  syntax: None  |  size: 0.53 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if($_POST['markasread']) {
  2.  
  3. #grab users details from db
  4.  
  5. $usersemailaddress = $_SESSION['email'];
  6. $grabusersinformation = mysql_query("SELECT id, email, username FROM people WHERE email = '$usersemailaddress'") or die("Error Grabbing User's Information");
  7. $iduser = mysql_fetch_assoc($grabusersinformation);
  8. $time = time();
  9.  
  10. $markasread = mysql_query("UPDATE `people` SET `lastchecked` = '$time' WHERE user_id = '$iduser[id]'") or die("There was a problem marking your Mentions as read");
  11.  
  12. header('Location: '.$_SERVER['HTTP_REFERER']);