By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,723 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,723 IT Pros & Developers. It's quick & easy.

sending session cookie

P: 2
Hi everyone!
I'm new in php. I have a project to be completed soon. I have to do a web survey. I used session to pass the respondent Id from one page to another. My problem is, when I add a html code for the background color, I got a warning-"cannot send session cookie-headers already sent by (output started at ...). When I didn't add the html script, the session cookie can be sent, but I didn't get a coloured background. how to insert background color using php instead of using html?

Thanks
May 3 '07 #1
Share this Question
Share on Google+
2 Replies


P: 48
Evry command that send headers (session_start(), for example) must be, in your code, before any output, even a break line outside a php area.

---------------begin-------------------------

(break line)

<?
session_start() ;
?>

ERROR !!!!!!!!!!!!!!!!!!!!!
May 3 '07 #2

P: 2
Evry command that send headers (session_start(), for example) must be, in your code, before any output, even a break line outside a php area.

---------------begin-------------------------

(break line)

<?
session_start() ;
?>

ERROR !!!!!!!!!!!!!!!!!!!!!




Thanks buddy!
The prob solved
May 7 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.