Hi all, I am creating a login system for my site. So far the registration and login both work great, but I am having a problem redirecting a user to the myaccount.php page after a successful login. I was planning on having a link to continue to their profile page and was doing it like so:
<?php
echo "<h2>Success! You are now logged in " . $_SESSION['username'] . "</h2><br><br>";
?>
<h2>Click here to continue to your profile: <a href="myaccount.php?username
However, i am unsure of how to complete the link, or if that is even the correct way to do it. Would it be recommended to use header() instead? And if so how would I implement that in this situation so it doesnt automatically redirect?
Thanks in advance for any help!