Hello everone,

I am buidling a small job application website, and i'm using a the basis of a login system taken from a Nettuts tutorial.
The logging in works fine, but I am having trouble getting the details for the currently logged in user, for example if a user enters their personal details, i can process the data into the database but it's not linked to which user!
I need a way to identify the user currently logged in, so i can update my insert statements to something like ...
'UPDATE cv where userID = $userID'. any help much appreciated, thx in advance


Here's the code i'm using to login a user:

PHP Code:
require_once 'includes/constants.php';

Mysql {
__construct() {
$this->conn = new mysqli(DB_SERVERDB_USERDB_PASSWORDDB_NAME) or
'There was a problem connecting to the database.');
verify_Username_and_Pass($un$pwd) {
$query "SELECT *
                FROM users
                WHERE username = ? AND password = ?
                LIMIT 1"
$stmt $this->conn->prepare($query)) {
$stmt->fetch()) {

Let me know if you need any further info.

Thx in advance,