How to redirect in php

To send the browser to a new URL, known as a redirection, you set the Location header. Generally, you’ll also immediately exit afterwards, so the script doesn’t bother generating and outputting the remainder of the code listing: header(“Location: http://www.example.com/elsewhere.html”);exit(); When you provide a partial URL (e.g., /elsewhere.html), the web server handles this redirection internally. This … Read more