What is the default session time in PHP and how can I
change it?
Answer Posted / rakesh kumar nautiyal
<?php
session_start();
session_cache_expire(15);
$cache_expire = session_cache_expire();
if(!isset($_SESSION['password'])){
$msg = "Your session is expired.Please re enter the
password";
header("Location: index.php?msg=".$msg);
} else {
// remaining code to display the gallery
}
?>
| Is This Answer Correct ? | 44 Yes | 63 No |
Post New Answer View All Answers
How to call a php function from another php file?
What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?
What is pdo in php why use?
How many data types are there in php?
What is string in php?
What is the meaning of die in php?
What is php used for?
What is the difference between rest and soap?
What does $_env mean?
How to include variables in double-quoted strings in php?
How does api connect to database?
How to Pass JSON Data in a URL using CURL in PHP?
What is scope of variable in php?
What is string function sql?
Is it possible to protect special characters in a query string?