With this article you will learn how to redirect your users to another page with a simple PHP function. This becomes really handy when you have authenticated your user and want to take it back to the home page, for example.
1. The function we will use is header()
The syntax is easy: header(“Location: http://theurl.tld“);
2. If we want to redirect to http://www.arvixe.com, we would use:
That’s it! Really simple, but one of the most used functions in real world website developing. If you have questions about this, comments or article suggestions, please do not hesitate to contact me and I’ll be more than glad to assist you.
Owner of Juapo2Services
Looking for quality web hosting? Look no further than Arvixe Web Hosting!