I have a simple script where a user logs in. I am trying to use sessions, so that a user remains logged in on whatever page he browses through the website.

I have these scripts:

* index.php - <http://pastebin.com/yqLtqPRC>
* login.php - <http://pastebin.com/KcQWjfw1>
* dbConfig.php - <http://pastebin.com/GKyfaJJV>
* upload.php - <http://pastebin.com/iMrz3WB8>
* functions.php - <http://pastebin.com/x44KrmxK>

If the user logs in or is logged in, 'You are now logged in, $user' is supposed to be shown, but the default 'You are not logged in.' displays throughout the pages.

No error messages are shown whenever I change page or try to log in.

**Latest version of the code can be found here:** <http://www.mediafire.com/?7n6qo3p4gpkaao4>

Can anyone help please?

thanks.