Session lost problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
suraj
Forum Newbie
Posts: 1
Joined: Mon Nov 29, 2010 8:24 am

Session lost problem

Post by suraj »

Please help me........


i have a problem with session

i use session in my site to authenticate user.but the problem is that i get session value in all pages except one page.

In this page some time session occurs but some times not.i am so confused

this is my code to store session from previous page.


<?php session_start();
$linuser=$_SESSION['linuser'];
$luser=$_SESSION['luser'];
$cuser= $_SESSION['cuser'];
$iuser=$_SESSION['iuser'];
if((isset($cuser))||(isset($luser))||(isset($linuser))||(isset($iuser)))
{
echo "description";
}else
{
$msg="Please registered first";
}
?>


but when i press back button of browser.these variable are filled in previous page.

I got this problem only in this page.

i already specified that sometimes these variable has value but sometimes not.....

i also define another session is same to store url..
like
$_session['url']="www.google.com";
it has value but above is not shown..............


any help is appreciated......
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Session lost problem

Post by social_experiment »

suraj wrote:...except one page
What is the code for this page?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply