Jump to content

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
Link to comment
https://forums.phpfreaks.com/topic/6189-header-writing-to-mysql-problem/
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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.