I have to face session problem in my new server.
Session not working properly for this link
I have refreshed page not show session and then again refresh page with Ctrl+f5 then session show.
So please tell me this is a server issue or coding issue ??
have a coding issue than solution me any one.
visit link to see phpinfo() : http://brahmanparivar.com/phpinfo.php
index.php and display.php
<?php session_start(); ?>
<html>
<head>
<title>PHP session</title>
</head>
<body>
<? if(isset( $_SESSION['name'] ) ){
echo $_SESSION['name'];
} else{
echo "not have a Session";
} ?>
<br><br>
<a href="index.php">home</a> <a href="display.php">display</a> <a href="set.php">set Session</a> <a href="logout.php">Session Out</a>
</body>
</html>
logout.php
<?php session_start(); ?>
<html>
<body>
<?php
if(isset( $_SESSION['name'] ) ){
session_destroy();
}else{
echo "not have a Session";
}
?>
<br><br>
<a href="index.php">home</a> <a href="display.php">display</a> <a href="set.php">set Session</a> <a href="logout.php">Session Out</a>
</body></html>
set.php
<?php session_start();
$_SESSION['name']="Session Set"; ?>
<html>
<head>
<title>PHP session</title>
</head>
<body>
<? if(isset( $_SESSION['name'] ) ){
echo "Set a Session :: Session Set";
} ?>
<br><br>
<a href="index.php">home</a> <a href="display.php">display</a> <a href="set.php">set Session</a> <a href="logout.php">Session Out</a>
</body>
</html>