Jump to content

Chat box and IM system


Recommended Posts

  • Replies 76
  • Created
  • Last Reply

Top Posters In This Topic

Make sure you're not starting the session anywhere else. You shouldn't have session_start anywhere in your own code. The session include file does that.
It is not.... that I know of. I checked the connect.php file, which is the only other include() file. I took out all the other session_start() functions in the pages. When I put it on the login page, when the user logs in, it writes something to the table. The id looks hashed, so no idea what it says. The content says BLOB - 0 Bytes. And the timestamp seems to be the only one I can slightly comprehend. It seems to work. The login page sets two $_SESSION variables when a sign in is successful. $_SESSION['logged_in'] = true; and $_SESSION['user'] = $username; both of which are used on other pages. On the home.php page, there's a line that says $user = $_SESSION['user']; and another that says <p>Welcome <?php echo $user; ?>!<\p>. If I don't include the sessions.php file, it works perfectly. If I include the file, it's empty. No idea why.
Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...

×
×
  • Create New...