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
Is nan in javascript?
What is overloading and overriding in php?
Does jwt protect against csrf?
How to remove white spaces from the beginning and/or the end of a string in php?
How to get the number of characters in a string?
What is list function with their uses.
Describe session in php.
What websites use php?
Can we run php on tomcat server?
Is time a dependent variable?
Why is php so popular?
Why php is also called as scripting language?
Explain mail function in PHP with syntax?
Does php need html?
What type of headers have to be added in the mail function to attach a file?