Restricting access to specific pages or sections of a website can be a common need. There are several ways you can take to obtain the same result. One of these ways is to use a server side programming language to obtain the result: for this need, PHP is a very good choice. Adopting the solution to implement user authentication via a server side programming language has a pro and a con. The pro is that you have great flexibility in the implementation of your authentication mechanism. You can restrict users access to a set of pages, to a single page or to a part of a single page. PHP can be easily integrated via MySQL, so you can use the database to store users’ accounts. It is really up to you. Obviously the con is that you have to implement this all by yourself. In this breaf article we will see how to password protect a web page using PHP. Continue reading »
