Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 119,729 PHP Programmers for FREE! Ask your question and get quick answers from experts. There are 1,320 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Warning: session_start().....

 
Reply to this topicStart new topic

Warning: session_start().....

Ladydice
post 3 Jul, 2008 - 08:08 PM
Post #1


New D.I.C Head

*
Joined: 25 Jun, 2008
Posts: 18


My Contributions


i'm trying to use sessions to pass variables over for one page to another. But i seem to face a problem. The variables are displaying the way it should but i keep getting this error

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ppc/public_html/testing/formtest2.php:11) in /home/ppc/public_html/testing/formtest2.php on line 78

and line 78 is

CODE


session_start();

$con_title =  $_SESSION['con_title'];  



can anyone help me identify the prob
User is offlineProfile CardPM

Go to the top of the page


no2pencil
post 3 Jul, 2008 - 08:13 PM
Post #2


Wet D.I.C.

Group Icon
Joined: 10 May, 2007
Posts: 5,586



Thanked 37 times

Dream Kudos: 2350

Expert In: Goofing Off

My Contributions


You have text on line 11 that is sending data out. session_start() must be the 1st item that sends output. Try moving it from line 78 to above line 11.
User is online!Profile CardPM

Go to the top of the page

Ladydice
post 3 Jul, 2008 - 08:23 PM
Post #3


New D.I.C Head

*
Joined: 25 Jun, 2008
Posts: 18


My Contributions


QUOTE(no2pencil @ 3 Jul, 2008 - 08:13 PM) *

You have text on line 11 that is sending data out. session_start() must be the 1st item that sends output. Try moving it from line 78 to above line 11.



i see...and the session has to be placed on the very first line of your codes, right?
User is offlineProfile CardPM

Go to the top of the page

no2pencil
post 3 Jul, 2008 - 08:26 PM
Post #4


Wet D.I.C.

Group Icon
Joined: 10 May, 2007
Posts: 5,586



Thanked 37 times

Dream Kudos: 2350

Expert In: Goofing Off

My Contributions


It needs to be before any data will be output to html. It's an error similar to if you send header information, & then try to work with the cookies.

Check php.net for information on Session Start & Sessions
User is online!Profile CardPM

Go to the top of the page

Ladydice
post 3 Jul, 2008 - 08:29 PM
Post #5


New D.I.C Head

*
Joined: 25 Jun, 2008
Posts: 18


My Contributions


QUOTE(no2pencil @ 3 Jul, 2008 - 08:26 PM) *

It needs to be before any data will be output to html. It's an error similar to if you send header information, & then try to work with the cookies.

Check php.net for information on Session Start & Sessions



Ok thanks i got it....
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/15/08 04:31PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month