[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp82
/
htdocs
/
jurnalpscp
/
lib
/
pkp
/
lib
/
vendor
/
adodb
/
adodb-php
/
pear
/
[
Home
]
File: auth_adodb_example.php
<?php // NOTE: The ADOdb and PEAR directories MUST be in your PHP include_path! require_once "Auth/Auth.php"; function loginFunction() { ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>"> <input type="text" name="username"> <input type="password" name="password"> <input type="submit"> </form> <?php } $dsn = 'mysql://username:password@hostname/database'; // To use encrypted passwords, change cryptType to 'md5' $params = array('dsn' => $dsn, 'table' => 'auth', 'cryptType' => 'none', 'usernamecol' => 'username', 'passwordcol' => 'password'); $a = new Auth("ADOdb", $params, "loginFunction"); $a->start(); if ($a->getAuth()) { echo "Success"; // * The output of your site goes here. }