1) So you need to create a form which registers the user and then INSERT the values into the database.
2) Now that the user is registered he needs a login form which compares the values the user enters from this form(login.php) to the values in the database. Once the user has been authenticated you should now register the users username in the session i.e.
<? session register("user_name"); ?>
At the top of every page you want your session variables available you need to specify :-
<? session_start(); ?>
To register a session variable you would use:-
<? session_register("some_variable"); ?>
To use that variable you would simply refer to it by its name but prefix it with a "$" sign i.e.
<?
$some_variable = 10;
echo($some_variable);
?>
If you need anymore help send me your email address and i'll mail you some code I use for sessions and session authentication.
Markus