it is saying this session_status is undefined function . can you tell me whats the replacement of it. in the given code
<?php
in this line it gives error.. plz give me the replacement of this code
if (session_status() != PHP_SESSION_NONE) {
session_destroy();
}
session_start();
if(!isset($_POST['secure'])){
$_SESSION['secure']= rand(1000, 2000);
}
else
{
if($_SESSION['secure']==$_POST['secure'])
{
}
else
{
echo 'incorrect , try again';
$_SESSION['secure']= rand(1000, 2000);
}
}
?>
plz help me i am stucked here