Jump to content

Archived

This topic is now archived and is closed to further replies.

suki2shoes

header / writing to mysql problem

Recommended Posts

hi guys

learning php and i'm very stuck.


[a href=\"http://pastebin.com/630534\" target=\"_blank\"]http://pastebin.com/630534[/a] - getting header sent already error, ln137, i guess its affected by the session include at top. [a href=\"http://pastebin.com/630511\" target=\"_blank\"]http://pastebin.com/630511[/a]. but dunno what the problem is.


also, when my session_id is written to my db, its just staying at 0. even though i know a random number is being generated(just prinnted it to test).

i'm not sure but maybe this is to do with lines 11-20 in [a href=\"http://pastebin.com/630534\" target=\"_blank\"]http://pastebin.com/630534[/a] also.

thank you in advance for help

Share this post


Link to post
Share on other sites
In reply to the first part:

[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=37442\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=37442[/a]

Share this post


Link to post
Share on other sites
The first error is always because the session_start() is after something is sent to the browser. Anything, white space or the wrong placement of the PHP tag can throw it off. I don't know that an include of the session_start() would do it, but it's possible.

Try placing the code without the include.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.