基于数据库中的URL重定向重定向用户

My client has online area's for each customer, which they access via there own unique url (very, very long url's) I want to create a login page, where they type their username given to them. Which will then read a database and redirects them to their specific URL.

I'm pretty new to coding, so any advice to achieve this would be a massive help.

Also would it be possible for the code to read a google database instead of a mysql database?

After you have selected the correct URL from the database based on the user, you can user header to redirect the user.

PHP

header('Location: ' . $urlFromDatabase);