PHP User Account Redirect


Hello there.
I am using a basic PHP user login system that stores the following information:
-Password (Hashed)
-Created At
The user system can be found here:

I would like to add a function so that when a user logs in successfully, it redirects them to a URL that is saved in the database for that user, and if one doesn’t exist, it redirects them to a page for all accounts across the board.

How would this be done?

Many Thanks.


It would be done where they do this in the tutorial,

if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
    header("location: welcome.php");