I am building a website which includes a login page. I need to redirect the user to their profile page once they\'ve logged in successfully, but I don\'t know how to do that
Just like you used echo to print a webpage. You could use also do the same with redirecting.
print("")