Posted on August 22nd, 2007
17915 views
[MY_P2L_AD]
Hey guys This PHP tutorial shall cover a BASIC authentication script enabling authorised users access to a specific website. This is my first tutorial for pixel2life.com and in this tutorial I will show on how to setup a login for your website using PHP. Let's Start
OK so here is our basic html from. In this we use the POST method and what are trying to do is to sent the value in USER and PASS to be authenticated by the script and to grand access or not. OK let's continue with the PHP coding.
OK the script above authenticate and authorize user that have the correct pass and username. If it is wrong it will not let them in. Of course you can combine the with MySQL to more advanced login. And you can customize this script by redirecting to a page and if it's wrong it will redirect to a error page. Ok that's it , i hope you have learned anything and if you have any question PM me. |