<?php
include("config.php");
session_start();
if($_SERVER["REQUEST_METHOD"] == "POST")
{
$myusername =$_POST['txtUserName'];
$mypassword = $_POST['txtPassword'];
$sql = "SELECT id FROM admin_login WHERE username = '$myusername' and password = '$mypassword'";
$result = sqlsrv_query($conn,$sql);
$count = sqlsrv_has_rows($result);
if($count == 1)
{
$_SESSION['login_user'] = $myusername;
header("location:home.php");
else
{
echo '<script language="javascript">';
echo 'alert("Please Enter Your User Name And Password Correct")';
echo '</script>';
}
}
?>
hare is my login code but i want to set session timeout include in same code . so any one can provide solution for this problem