Jump to content

Chat box and IM system


shadowayex

Recommended Posts

  • Replies 76
  • Created
  • Last Reply
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 comment
Share on other sites

Archived

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


×
×
  • Create New...