I've been trying to work out how to use sessions & I've looked through tutorials and topics here, and now I'm even more confused.
In the tutorial I'm using it says about using session_start() and session_register(). The way I read it is that session_start() actually starts a new session. Yet in a topic in this forum it says to put session_start() at the top of each page. Won't that start a new set of session variables?
You should indeed place it at the top of every page taking part in the session. session_start() either starts or resumes a session.
It basically loads the session variables into the environment, adds a handler to the page output (which will make sure to add the session ID to the end of URLs in your code, if not using cookies) etc. So, since one PHP page doesn't actually know what the previous one did, we tell it to keep the session up by calling session_start().
The session variables won't be cleared, because you got the current session ID in through the url or a cookie.
As Serge said, session_start() is a bit of a misnomer because it also resumes if there is a session logged for that user already.
Remember that you have to start(/resume) a session before you do any output to the browser! That is the reason why the tutorial suggests putting it at the top of every page. Personally it's a lot easier to include() a header.php file and you can stick all the HTML <head> contents and doctype in at the same time.