<?php

session_start();
$link=mysql_connect("localhost", "root")
	or die("could not connect to database server");
	mysql_select_db("ramones", $link) or die(mysql_error());
$user_check=$_SESSION['user'];

$ses_sql=mysql_query("select Username from user where Username='$user_check' ");

$row=mysql_fetch_array($ses_sql);

$login_session=$row['Username'];

if(!isset($login_session))
{
header("Location: login.php");
session_destroy();
}
?>