I want to make login page, another php page handles the request, I want t check the validity of credential info, in a case that user name or pswd is not correct, I want to make redirection to login page, HOW can I make redirection in php ??
Redirection in PHP is easy. Just make sure not to print out any HTML before you do it:
header('Location: http://www.example.com/');
You want to use 'header()':
header('Location: /login.php');
Reminder that no data can be printed to the screen before a header() is called.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With