<?php
require_once('config.php');

mysqli_query($db, "UPDATE users SET remember_token=NULL WHERE email='$_SESSION[email]' ");
// delete cookie
setcookie("RememberMe", "", time() - 3600, "/");

session_destroy();

header('location:/');
?>