php header location vs php_redirect

Issue

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

Solution

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

Answered By – Niet the Dark Absol

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published