How can PHP be used to implement a delay in automatic redirection after form submission?

To implement a delay in automatic redirection after form submission using PHP, you can use the `header()` function to set a refresh header with a specified delay in seconds before redirecting to the desired page. This can be useful for providing users with a message or feedback before redirecting them to another page.

<?php
// Delay in seconds before redirecting
$delay = 3;

// Message to display to the user
$message = "Thank you for submitting the form. You will be redirected in $delay seconds.";

// Set refresh header with delay
header("refresh:$delay;url=redirect-page.php");

// Display message to the user
echo $message;
?>