How can the PHP header function be used to redirect users to a specific page after completing a Captcha verification?
After a user completes a Captcha verification, you can use the PHP header function to redirect them to a specific page. This can be done by sending a Location header with the URL of the page you want to redirect the user to. This ensures that once the Captcha verification is successful, the user is automatically redirected to the designated page.
// Check if Captcha verification is successful
if ($captcha_verified) {
// Redirect user to a specific page
header("Location: https://www.example.com/success_page.php");
exit();
}
Related questions
-
XSS htmlentities htmlspecialchars
-
eval security risks code injection
-
XML JSON PHP