blob: e6d44dcd97c32e23385178edc46a2e94a87c22d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php
require_once "user.php";
require_once "database.php";
require_once "misc.php";
$username=$_POST["username"];
$password=$_POST["password"];
/*server side verification*/
if(gettype($username)!="string" || gettype($password)!="string")
{
die("You didn't specify the pass or the username");
}
$database=new Database();
$user=$database->authenticate($username,$password);
if(!$user)
{
die("Password or username is incorrect");
}
echo "Username: {$user->username}\n";
echo "Email: {$user->email_address}";
?>
|