1. Is it possible to change the session expire time with session_cache_expire? I have tried it, but it don't work! Is there any other solutions to destroy the sessions afer 15 minuts?
2. I have a login script, where the username and the crypted password are stored in a session. I use a function like this to check if the user is logged in:
sesion_start();
if($_SESSION['user'] == "User" and $_SESSION['pass'] == "Pass"){
echo "Okay"
}else{
include "login.php";
}
The values are checked with a mysql database, this is just an example.
But when I use the function session_start(); it creates a blank session, not that it is a big problem - but are there any way to check if a session is created, and then run the session_start() if it is?