How to make a redirect in PHP?

Posted by Editorial Staff | Updated on

Answer: Use the PHP header() Function

The header() function is used to send a raw HTTP header. See the ยป HTTP/1.1 specification for more information on HTTP headers. Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP.


Example #1 header() Function

How to use Header() in PHP

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers