Connect with us

Scripts

Easy Login

[ad_1]

LIVE PREVIEWBUY FOR $6

With this class you can easely create a login page that checks the data in a XML, CSV or database table. The power of the script lays in that you can use it on every MySQL database table even on existing tables from other software packages like WordPress, Mediawiki, MantisBt, ….. This is because you can define a custom password encryption function, user and password field. The combination of this functionalities makes it a universal usable class.
I created this class because most of my clients just need a simple login form without other advanced features like user roles and so on.

Use example:

We have a database table that holds our users. In this table there is a field user_field also a password field(pass_field) and a salt field(salt_field). Our password encryption is created like this:

password_hash = md5(password . "-" . salt);

To create a loginsystem based on this table we can use this code:

include("Login.php");

    $Login = new Login();
    $Login->InitDatabase("localost", "dbuser", "dbpass", "dbname", "user_table", "user_field", "pass_field");
    $Login->SetPasswordEncoder("myhash");

    // Custom password encoder
    function myhash($password, $fields){
    return md5($password . "-" . $fields->salt_field);
    }

    if($Login->Test($_POST['username'], $_POST['password'])){
    echo "Correct";
    }else{
    echo "Incorrect";
    }

If you want to change this example above to use a CSV file (user.csv) as datasource instead of a database table the only thing you need to do is replacing:

$Login->InitDatabase("localhost", "dbuser" ....

with

$Login->InitCsv("users.csv");

or if you prefer xml:

$Login->InitXml("users.xml");

Extendible:

The class is very easy to extend with some custom code. In the download I included two different extension. One for writing login actions to a log file and one that saves the current loggedin user in a session so that you can visit different pages without having to login again. The extensions are very easy to use. The only difference is that you need to include the extension besides the Login.php class. And instead of creating an instance of the Login class you create an instance of the extended SessionLogin class. The rest of the code is the same.

An example how to use the SessionLogin extension:

include("Login.php");
include("SessionLogin.php");
$Login = new SessionLogin();
// The rest of the code is the same as before

Examples included:

  • CSV file
  • MatnisBt database
  • MediaWiki database
  • WordPress database
  • Xml file
  • Login form with sessions

Demo

You can do a login on the demo page with:
admin/test
sitebase/mypassword

Full PDF documation is also included in the download.

[ad_2]
Source

Download Png Image

Subscribe Our   Youtube Channel

Title

fruzo avis site de rencontre4 hours ago

De videos phallus ego te leche ensuite te baise ego arrete et la miss j’me embrasse

De videos phallus ego te leche ensuite te baise ego arrete et la miss j’me embrasse Viggo mortensen devetu combat...

CrewMe find out here4 hours ago

These Steamy Real-Existence Gender Stories Can make you Slutty Since Hell

These Steamy Real-Existence Gender Stories Can make you Slutty Since Hell step 3. Football enthusiast “I am a manufacturer during...

Bumble hookup website5 hours ago

Including, when the she texts you you to paragraph, send that paragraph

Including, when the she texts you you to paragraph, send that paragraph Rather, text the girl in a way that...

CowboyCowgirl.com find out here6 hours ago

Therefore i left your and you may started dating a cute son

Therefore i left your and you may started dating a cute son Next anything happened you to she did not...

12 month installment loans8 hours ago

I don’t want to come off as being an advocate of payday lenders

I don’t want to come off as being an advocate of payday lenders It begins like this: “Except for the...

cdates.org besten flirt8 hours ago

Verhalten Asiaten gackern Die Kunden nie aus. Durch gackern bezwecken Asiaten andere sichern.

Verhalten Asiaten gackern Die Kunden nie aus. Durch gackern bezwecken Asiaten andere sichern. Etliche Geschaftsreisende, die umherwandern nach Asien offnen,...

sugardaddylist.org sugar dating8 hours ago

8 Most useful Relationship Applications and you may Websites to possess Immigrants

8 Most useful Relationship Applications and you may Websites to possess Immigrants Of regional singles to worldwide couples, these types...

Blackdatingforfree hookup website9 hours ago

Exactly how Grindr turned a nationwide safety procedure

Exactly how Grindr turned a nationwide safety procedure Which story falls under a team of tales named Grindr is a...

payday loans near me online9 hours ago

Could you Go to Prison to have Not paying Straight back That loan?

Could you Go to Prison to have Not paying Straight back That loan? Zero, you simply cannot head to prison...

Hindu Dating pojedyncze miejsce, lokalizacja9 hours ago

Aroused Russian people pictures horny in most issues

Aroused Russian people pictures horny in most issues relationship a police officer united kingdom Russian young girl Photo, Inventory Photographs...

essay writer9 hours ago

Inferences are the thing that you discover according to an event. Producing Inferences and Painting Findings

Inferences are the thing that you discover according to an event. Producing Inferences and Painting Findings Aiding your youngster understand...

Blackcupid hookup website10 hours ago

How exactly to flirt with a prospective you to-nights dating mate on the web?

How exactly to flirt with a prospective you to-nights dating mate on the web? Searching for your perfect spouse into...

sugardaddymatch.net is having a sugar daddy illegal10 hours ago

If Time Is useful End up being Imminent

If Time Is useful End up being Imminent Marley Hall is actually an author and you will truth checker that...

casino online canada10 hours ago

What is the Big deal having Live Casinos?

What is the Big deal having Live Casinos? Can you Wager 100 % free? To experience at no cost during...

Pes Seznamka priklady profilu11 hours ago

Now I’m discussing Sensuous, Naughty Nude Photographs of Susan Sarandon

Now I’m discussing Sensuous, Naughty Nude Photographs of Susan Sarandon Susan Sarandon Nude adult Sexy Pictures: Susan Sarandon can be...

Trending