Jump to content

session problems part 2


severndigital

Recommended Posts

ok .. I am now having another problem.

 

my sessions aren't holding.

 

I have an index page that uses a switch with the sesssion_start(); as the first line.

 

//start the session
session_start();

//define includes
include_once('lib/connect_db.php');
include_once('func/system.func.php');
include_once('class/system.class.php');
include_once('func/session.func.php');


//start main index.php switch
switch($_GET['view']){
##	
case 'login':
$doLogin = doLogin();
if($doLogin[0] == 0){
	$error = $doLogin[2];
	$mainContent = $doLogin[3]; 
}else if($doLogin[0] == 1){
	$regSessions = registerSessions($item=$doLogin);
	$mainContent = $doLogin[8];
}
break;
##
case 'campaign':

   	$mainContent = 'camps/newcamp.php';
  
break;
##
case 'logout':
//$destroy = destroyAll();
$error = '<span class="error">You have been logged out.</span>';
$mainContent = 'forms/login.php';
break;
}
include_once('template.php');

 

when I login it .. i get all my sessions and they are registered.

as soon as I navigate away from the login case and goto anything, in this chunk of code the campaign case, I loose all my sessions

 

any ideas??

 

thanks

chris

 

 

*******EDIT ************

 

sorry for the DUP post. i got a MySQL error from the site.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.