I am starting a site I created a while back from scratch. And I obviously want users to be remembered if they come back to my site. I am thinking that I need to keep an object containing all the information from one page to the next. So when they login, I store a cookie on their machine with their user id and then when the come back simply load their details back into the object. But I don't know how to keep all their information from page to page. I have tried messing around with $_SESSION, I set the object, but when I goto the next page and check for it it doesn't seem to be valid. And before I do anything, on my index.php page, I do session_start();
Am I missing something, or am I looking in completely the wrong direction here?A session page should look like this...
<?php session_start(); ?>
<html>
<head>
<title>Your Title</title>
</head>
<body>
<!-- Content -->
</body>
</html>session_start() has to be on every pag eyou want to use sessions on.
Am I missing something, or am I looking in completely the wrong direction here?A session page should look like this...
<?php session_start(); ?>
<html>
<head>
<title>Your Title</title>
</head>
<body>
<!-- Content -->
</body>
</html>session_start() has to be on every pag eyou want to use sessions on.