session id ISSUE?
Posted: Sun Nov 02, 2008 10:49 am
When using the session start code for my clnt login pages - it seems that it does not carry over to the next page once in the member section.
after logging in - i see the proper clnt info on the main profile page - however when i click to view another clnt page - my browser takes me to the login page which is the page i coded the user to go to if credentials are not saved.
please look at my code and let me know if anything is wrong. thanks!
this is the php file that is loaded once logged in, this page directs you to the proper verson depending on which browser you are using:
Code:
<?
session_start();
$_SESSION['logname']= $user;
$clientN = $_SESSION['client'];
$me = $_SESSION['name'];
$me2 = $_SESSION['name2'];
if (@$_SESSION['auth']!="yes")
{
header("Location: ../personal_account_login.php");
exit();
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
function detectBrowser()
{
var browser=navigator.appName;
if (browser=="Microsoft Internet Explorer")
{
window.location = ("http://provicanhealth.com/code/FAMPROFILE_EX.php");
}
else
{
window.location = ("http://provicanhealth.com/code/FAMPROFILE.php");
}
}
</script>
<title>ProviCan.com</title>
</head>
<body onload="detectBrowser()">
</body>
</html>
at the begining of each page i placed the session start as follows:
Code:
<?
session_start();
$_SESSION['logname']= $user;
$clientN = $_SESSION['client'];
$me = $_SESSION['name'];
$me2 = $_SESSION['name2'];
if (@$_SESSION['auth']!="yes")
{
header("Location: ../personal_account_login.php");
exit();
}
after logging in - i see the proper clnt info on the main profile page - however when i click to view another clnt page - my browser takes me to the login page which is the page i coded the user to go to if credentials are not saved.
please look at my code and let me know if anything is wrong. thanks!
this is the php file that is loaded once logged in, this page directs you to the proper verson depending on which browser you are using:
Code:
<?
session_start();
$_SESSION['logname']= $user;
$clientN = $_SESSION['client'];
$me = $_SESSION['name'];
$me2 = $_SESSION['name2'];
if (@$_SESSION['auth']!="yes")
{
header("Location: ../personal_account_login.php");
exit();
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
function detectBrowser()
{
var browser=navigator.appName;
if (browser=="Microsoft Internet Explorer")
{
window.location = ("http://provicanhealth.com/code/FAMPROFILE_EX.php");
}
else
{
window.location = ("http://provicanhealth.com/code/FAMPROFILE.php");
}
}
</script>
<title>ProviCan.com</title>
</head>
<body onload="detectBrowser()">
</body>
</html>
at the begining of each page i placed the session start as follows:
Code:
<?
session_start();
$_SESSION['logname']= $user;
$clientN = $_SESSION['client'];
$me = $_SESSION['name'];
$me2 = $_SESSION['name2'];
if (@$_SESSION['auth']!="yes")
{
header("Location: ../personal_account_login.php");
exit();
}