Re: [PHP] What is wrong??????

This is a discussion on Re: [PHP] What is wrong?????? within the PHP General forums, part of the PHP Programming Forums category; --- phpu <phpu@go.ro> wrote: > Warning: Cannot send session cookie - headers already sent by > (output started ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-14-2003
Chris Shiflett
 
Posts: n/a
Default Re: [PHP] What is wrong??????

--- phpu <phpu@go.ro> wrote:
> Warning: Cannot send session cookie - headers already sent by
> (output started at c:\apache\htdocs\proiect_gsm\login.php:11) in
> c:\apache\htdocs\proiect_gsm\login.php on line 81


This should be obvious, but you do something on line 81 that you cannot do,
because output began on line 11.

My guess would be that you have output such as:

> print 'Email or password cannot be blank ...


prior to starting your session:

> session_start();


Try starting your session before you output anything (moving the code to the
top may be a quick fix), and your warning should go away.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0