How can you pass parameters in the header() function in PHP?

When using the header() function in PHP to pass parameters, you can include them in the URL as query parameters. This can be done by appending the parameters to the URL using the "?" symbol followed by the parameter name and value pairs separated by "&" symbols. By doing this, the parameters will be passed in the header of the HTTP response and can be accessed by the destination page using PHP's $_GET superglobal array.

// Example of passing parameters in the header using the header() function
$param1 = 'value1';
$param2 = 'value2';

header("Location: destination.php?param1=$param1&param2=$param2");
exit;