PHP code example of optiwariindia / auth
1. Go to this page and download the library: Download optiwariindia/auth library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
optiwariindia / auth example snippets
Please update Database details as per your database provider.
$db=[
"host"=>"localhost",
"user"=>"root",
"pass"=>"",
"name"=>"authdb"
];
optiwariindia\auth::config($db);
optiwariindia\auth::init();
if(optiwariindia\auth::isLoggedIn()){
//Action when user is logged in
}else{
//Action when user is not logged in
}