Hi,
I have a user login system, and this system relies on sessions to display different elements of a page, depending on who has logged in and what level they are to view (ie - admin or client).
I had forgotten to put the start_session() in a few pages, so have just gone back to do this, and there is one page in particular that is causing me a problem. I don't know If I have forgotten some basic rule, but it has me stumped........
this page workes
root/index.php
require_once ("inc/img_functions.php") ;
require_once ("inc/blog_functions.php") ;
require_once ("inc/inc.php") ;
require_once ("Connections/photogallery.php") ;
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
but this page DOES NOT, as soon as the session_start() code is reached, page output stops..............if I comment it out, it works again..........
root/blog/index.php
require_once ("../inc/blog_functions.php") ;
require_once ("../inc/inc.php") ;
require_once ("../Connections/photogallery.php") ;
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
any ideas?