Files
minecraft-plugins/EasyBans-Web/api/api.php
Johnathon Slightham 1e79740420 Update api.php
2020-04-22 21:25:31 -04:00

17 lines
384 B
PHP

<?php
define("key", KEY); // TODO: Make key customizable.
function get_mysql(){
$mysql = new MySQLi("", "", "", ""); // login details removed
if($mysql->connect_error){
die($mysql->connect_error);
}
return $mysql;
}
function add($uuid, $reason){
get_mysql()->query("INSERT INTO bans (uuid, date, reason) values ('$uuid', '" date("Y-M-D H:M:S") "', ");
}
?>