I have a login script,which after a member login successfully session is registered.
The problem is that if user dont use the page for a certain time from 30 minutes. session a getting lost,and member should login again.
So what can i do to lengthen the session time,if its possible even for a Week.
here is my login script.
<?php session_start();
$user=$_POST['user'];
$password=$_POST['password'];
//connecting to databases
include"config.php";
$query = "SELECT *FROM login where (user='$user' and password='$password')" ;
$result=mysql_query($query);
if(mysql_num_rows($result) == 1) {
$row=mysql_fetch_array($result);
$id=$row['id'];
$user=$row['user'];
$password=$row['password'];
$email=$row['email'];
$_SESSION['id']=$row['id'];
$_SESSION['user']=$row['user'];
$_SESSION['password']=$row['password'];
$_SESSION['email']=$row['email'];
$_SESSION['name']=$row['name'];
$_SESSION['photo']=$row['photo'];
include "myprofile.php";
}else{
include"wronglogin.php";
}
?>
any help will be appreciated.