justsomeguy 1,135 Posted May 27, 2008 Report Share Posted May 27, 2008 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. Quote Link to post Share on other sites
shadowayex 1 Posted May 27, 2008 Author Report Share Posted May 27, 2008 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.