Jump to content


header / writing to mysql problem

  • Please log in to reply
2 replies to this topic

#1 suki2shoes

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 30 March 2006 - 04:48 PM

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

#2 Eddyon

  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts
  • LocationEngland

Posted 30 March 2006 - 04:57 PM

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]

#3 ober

  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 30 March 2006 - 04:59 PM

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.

Info: PHP Manual

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users