I have probem with session the code is as given below .this genrates error :
Fatal error: Call to undefined function: session_cache_e xpire() in c:\apache\htdoc s\phppgm\employ ee files\authentic ate.php on line 6
//code
<?
session_cache_l imiter('private ');
$cache_limiter = session_cache_l imiter();
session_cache_e xpire(15);
$cache_expire = session_cache_e xpire();
session_start() ;
?>
<?php
if(!$uname or !$password )
{
echo("Enter all fields");
exit();
}
if($uname and $password)
{
$_SESSION['password']=$_POST['password'];
session_registe r($uname,$passw ord);
$result=session _is_registered( $uname);
$result.=sessio n_is_registered ($password);
require("mym.ph p");
$conn=mysql_con nect("localhost ",$user,$pw d)
or die(mysql_error ());
$rs=mysql_selec t_db($database, $conn)
or die(mysql_error ());
$sql="Select * from $table where uname=\"$uname\ " and password=\"$pas sword\" ";
$rs=mysql_query ($sql)
or die(mysql_error ());
$num=mysql_num_ rows($rs)
or die("User Name or Password may be wrong.So Try Again");
if($num!=0)
{
echo("<b>Welcom e you are successfuly logged in $uname</b>");
if(!isset($_SES SION['password']))
{
$msg = "Your session is expired.Please re enter the password";
header("Locatio n: HomePage.php?ms g=".$msg);
}
else {
// remaining code to display the form
}
{ ?>
Fatal error: Call to undefined function: session_cache_e xpire() in c:\apache\htdoc s\phppgm\employ ee files\authentic ate.php on line 6
//code
<?
session_cache_l imiter('private ');
$cache_limiter = session_cache_l imiter();
session_cache_e xpire(15);
$cache_expire = session_cache_e xpire();
session_start() ;
?>
<?php
if(!$uname or !$password )
{
echo("Enter all fields");
exit();
}
if($uname and $password)
{
$_SESSION['password']=$_POST['password'];
session_registe r($uname,$passw ord);
$result=session _is_registered( $uname);
$result.=sessio n_is_registered ($password);
require("mym.ph p");
$conn=mysql_con nect("localhost ",$user,$pw d)
or die(mysql_error ());
$rs=mysql_selec t_db($database, $conn)
or die(mysql_error ());
$sql="Select * from $table where uname=\"$uname\ " and password=\"$pas sword\" ";
$rs=mysql_query ($sql)
or die(mysql_error ());
$num=mysql_num_ rows($rs)
or die("User Name or Password may be wrong.So Try Again");
if($num!=0)
{
echo("<b>Welcom e you are successfuly logged in $uname</b>");
if(!isset($_SES SION['password']))
{
$msg = "Your session is expired.Please re enter the password";
header("Locatio n: HomePage.php?ms g=".$msg);
}
else {
// remaining code to display the form
}
{ ?>
Comment