I have a php program that works fine on my localhost, but when i upload it to my active website, it doesn't work properly.
The main issue is that it doesn't keep track of a logged in member as it should. For example, after a member logs in, he can access his account information, but if he moves around the site, his record pointer somehow gets lost, so he is no longer associated with his account.
Remember, this doesn't happen on my localhost. I use two $_SESSION[] variables to keep the record pointer on the logged in member as he moves around the site.
Can anyone tell me why that pointer is being lost on the active website and not the localhost?
Below is a section of what i consider to be the relevant code:
if($_SESSION['userlog']!="")
{
$id=$_SESSION['memid'];
$loginid=$_SESSION['loginid'];
$yrEnt=substr($id,0,4);
$mId=substr($id,5,4) ;
$sql="SELECT * FROM `membdetail` WHERE `mem_entersch` = '".$yrEnt."' AND `mem_id` =".$mId." AND `mem_logid` ='".$loginid."' ";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
$id=$row["mem_logid"];
$name=$row["mem_prefix"]." ".$row["mem_fname"]." ".$row["mem_lname"];
$reg_no=$_SESSION['memid'] ;
$sch_relation=$row["mem_relation_to_sch"];