![]() |
Secure PHP login without database (Make login page in php no database) 1 Attachment(s) Although not recommended but maybe for some reason you need to create a PHP login without the use of any database (SQL). For some reason you maybe scared to approach, but here I made a script that is fairly secure without utilizing any database at all. It allows users to login and stay logged in. If you are one of those people then here's the script for you. Now this script does not use any external files to store user names and password as it opens up more security flaws for hackers, so everything is managed in an array within the PHP. If somebody was able to get a hold of your PHP file this will compromise things but the chances of that happening is fairly close to utilizing a database. Features
Now by not utilizing a database there are some drawbacks and they are:
Less Talk More Script Installation: Just download all the necessary files which includes:
PHP Code: Modify the domain code and three random numbers. The three random numbers is the key that makes login secure and unique to your website only. Then at the bottom you can create all of your users. Now in every page that you require the user to login just add the following code to the very top of the page, exactly on line 1. PHP Code: Login and Logout You can lead users to login and logout with links to login.php and logout.php as such. PHP Code: In this case the only macro you can call up is the username after they have logged in. You can call it in a welcome back message like this (placed in your HTML). PHP Code: |
| All times are GMT +5. The time now is 03:46 AM. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.