21 lines
645 B
PHP
Executable File
21 lines
645 B
PHP
Executable File
<?php
|
|
include("../../mysqlverbinden.php");
|
|
|
|
if(!isset($_GET["username"])) die("GET username fehlt");
|
|
$username=$_GET["username"];
|
|
|
|
if(!isset($_GET["password"])) die("GET password fehlt");
|
|
$password=$_GET["password"];
|
|
|
|
$result=mysqli_execute_query($db_id,"SELECT `password` FROM `adminpanel-users` WHERE `username`=?;",[$username])->fetch_assoc();
|
|
if(!isset($result["password"]))
|
|
die('{"error":"Falscher Benutzername","success":false}');
|
|
|
|
if($result["password"]!=$password)
|
|
die('{"error":"Falsches Passwort","success":false}');
|
|
|
|
$token="";
|
|
|
|
echo json_encode(["token"=>$token,"success"=>true],JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
|
|
|