i am using sessions to store the name of the skin for my site the code is some thing like this
session_start();
if(!session_register($_SESSION['Skin'])){
$_SESSION['Skin'] = "Default";
}
and i am using the value of the $_SESSION to include the index.php of the skin folder
include("Skinz/".$_SESSION['Skin']."/index.php");
when i run the script i am getting a waring the
session cookie cannot be balh balh... header already sent
how do i eliminate this warning using ob_start() and related fuction
or is there any possibilty of eliminating this warining with out using ob_start
Sessions, cookie header conflicts
Moderator: General Moderators
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Once you've fixed the header problem you should change:
to
Mac
Code: Select all
if(!session_register($_SESSION['Skin'])){Code: Select all
if (!isset($_SESSION['Skin'])) {- harsha
- Forum Contributor
- Posts: 103
- Joined: Thu Jul 11, 2002 1:35 am
- Location: Bengaluru (Bangalore) > Karnataka > India
thanx fixed the session problem
thank you all it was due to the whitespaces
Wow this is a silly mistake !!!!
Wow this is a silly mistake !!!!