Drakla wrote:1. If you want to use sessions you have to use session_start() on every page that uses them.
So would I just want to put the session code on every page then. What happens if a user goes to the homepage, a session is started, then fills out some form and the form data is saved in the session array, and then the user clicks to other pages within the same site and those pages do not have the session coding on them. Will the data in the session array be lost? Or will it still be there and available even though the user went to a page that did nto have the session_start() coding on it?
Also, assuming that I put the session_start() on every page (don't see why this hurts), just want to confirm if I can keep it simple and code with the following at the VERY TOP of the page, even before the opening <html> tag:
<?php
session_start();
?>
Thanks.