fake PHP login
- Started
- Last post
- 7 Responses
- mijlee
Anyone have a nice simple 2 page PHP login script.
I want a form that connects to a simple bit of PHP which holds a handfull of passwords.
- rabattski0
why not use .htaccess instead of a script?
- ********0
If you insist on using PHP then just have your form send the login into to a .php to process it. The just compare the input to you desired password (im assuming you know basic PHP right?)
if(login_variable=correct_login...
desired function;
}else{
echo "Incorrect Login";
}or store your password in mysql for added secutiry, do a query when they submit.
- mijlee0
.htaccess no good because I am hosted on a pony IIS box, also don't have MySql set up either (xtra cost).
Here's what I need;
FORM with user name and password
ON SUBMIT
PHP parses above inputs and compares against half a dozen hard coded entries with in the PHP file, if the inputs match then the client gets moved on to their page.Doesn't need to be secure just nice and simple.
- ********0
The right way to do it would be using MySQL (by the way it's free and almost always coupled with PHP, I'm surprised that your host is charging you).
http://www.stargeek.com/php_logi…
Otherwise, just write the script from scratch, I doubt you will find anything compiled because of how simple it is to write.
- rabattski0
then do what randoman says (first post).
- mijlee0
been trying google, AV, Yahoo, MSN all day, nothing like what I need. Got the solution off a mate in the end.
If anyone else wants to fake a login system, this is works a treat;