Files
post-grachelor-web/login.php
2017-04-27 21:01:40 +02:00

25 lines
570 B
PHP

<?php
/**
* Created by PhpStorm.
* User: leanderschmedemann
* Date: 29/03/2017
* Time: 20:54
*/
require_once('includes.inc.php');
$data = '';
$error = 0;
$uid = isset($_GET['uid']) ? $_GET['uid'] : '';
$db = new Database();
if($uid == '') {
$error = 16101;
} else {
$uid_exists = $db->query('SELECT EXISTS FROM "Users" WHERE "ID" = $1', array($uid))['data'][0]['exists'];
if ($uid_exists == 't') {
$error = 16102;
} else {
$name = $db->query('SELECT "name" FROM "Users" WHERE "ID" = $1', array($uid))['data'][0]['name'];
}
}
?>