With PHP it is possible to redirect to another page using the header() network function. The header() function is used to send a raw HTTP header why it can easily be used transfer a user to a new page without clicking on a link. If you are not familiar with the header() function you need to be aware that just like in any other web programming language it is required to write the headers before the actual page content is sent. So if you experience any errors keep in mind that it is a common error to read code with e.g. include() or require() functions and have spaces or empty lines that are output before header() is called. In this tutorial I will show you in detail how to use header() to perform redirects in PHP.
{ 6 comments }




