This question already has an answer here:
- How do I make a redirect in PHP? 31 answers
I have a question...
I've developed a php safe login page, now when I run a check to redirect the user with "<?php header('location: home.php'); ?>
" It doesn't work while on the actual domain for whatever reason.
However I thought of this code
<?php
if (login_check($mysqli) == true) {
echo "<meta http-equiv='refresh' content='0;URL=home.php'>";
}
?>
Would that code be safe and functional? I am most concerned with the privacy one could exploit. It seems to work while I am on my local server, I have not uploaded it yet.
Is there another way that would be better than what I have currently?
</div>