This is a short php logout script for logging out a user that you previously logged in through your website:

<?
function redirect($url)
{
  echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=$url\">";
  echo "Click <a href=$url>".here.'</a> if you not get redirected';
}
  session_start();//initialize the session data
  $_SESSION['session_user'] = '';//clear the session user that you created on login
  unset($_SESSION['session_user']);//destroy the session variable of the user
  //redirect to home page
  redirect('index.php');
?>