I managed to get sessions working with PHP, however, the sessions are merging/mixing. If one user logs in and visits a certain page, and then a new user visits that same page, they will jump on to the first user's session.

My code is as follows:

```
session_start();
session_id();

$rainbow = mysqli_query($db, "SELECT * FROM Users WHERE ID='" . $client->ID . "'");
$rainbow = mysqli_fetch_object($rainbow);
$_SESSION['Username'] = $rainbow->Username;
$_SESSION['Password'] = $rainbow->Password; 

```

Every time a page is loaded, `session_start()` is called. I'm also using `session_id()` so I'm not sure why the sessions are merging.

This is becoming a large security problem.

Additionally, pages seem to be caching along with this issue, but it doesn't seem to be a session issue caused by caching. If you refresh the page, you will be placed back in your correct session and the page will be updated, otherwise, it will not.