Skip to content
Advertisement

php header location vs php_redirect

What’s the difference between the function "HTTP_redirect" and "header location" in PHP ?

When must I use the function "HTTP_redirect" ?

When must I use the function "header location" ?

Look that: https://php.net/manual/en/function.http-redirect.php –> Manual for HTTP_redirect https://php.net/manual/en/function.header.php –> Manual for the function header

Advertisement

Answer

http_redirect is basically a helper function, making it easier to use header location by allowing you to pass an array for GET data.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement