my session variable is working in localhost but when same code is not run on live server i m pasting code i do require some hint
<?php
session_start();
require_once('conn.php');
if(isset($_SESSION['Uid']))
{
header('location:f5.php');
}
if(isset($_REQUEST['Submit']))
{
$ckcomm='select * from login_tb where Uname="'.$_REQUEST['textfield'].'" and Pass="'.$_REQUEST['textfield2'].'"';
$ckread=mysql_query($ckcomm);
if(!$ckread)
{
die('error in query');
}
$ckrw=mysql_fetch_array($ckread);
$nrw=mysql_num_rows($ckread);
if($nrw>0 and isset($_SESSION['Qid']))
{
$_SESSION['Uid']=$ckrw['Uid'];
$_SESSION['uname']=$ckrw['Uname'];
header('location:f5.php');
}
elseif($_SESSION['Qid']=="")
{
$_SESSION['uname']=$ckrw['Uname'];
$_SESSION['Uid']=$ckrw['Uid'];
header('location:f1.php');
}
else
{
?>
<script language="javascript">
alert('incorrect username or password');
</script>
<?php
}
}
?>
Session variable not working on live server
Page 1 of 12 Replies - 4032 Views - Last Post: 22 October 2009 - 07:34 AM
Replies To: Session variable not working on live server
#2
Re: Session variable not working on live server
Posted 22 October 2009 - 07:22 AM
First, could you use [code] tags!
Secondly, it's most likely an issue with the PHP Configuration (php.ini) on the live server. Make sure that the session directory is setup in php.ini, exists and is writable.
Secondly, it's most likely an issue with the PHP Configuration (php.ini) on the live server. Make sure that the session directory is setup in php.ini, exists and is writable.
This post has been edited by RudiVisser: 22 October 2009 - 07:22 AM
#3
Re: Session variable not working on live server
Posted 22 October 2009 - 07:34 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|