Globals work sometimes

This commit is contained in:
Ruan 2015-06-08 17:49:14 +02:00
parent 331207f069
commit 755cb4c221

View File

@ -7,8 +7,8 @@ if (isset($_POST['name'], $_POST['table'])) {
return;
}
require 'includes/page.php';
$name = $_POST['name'];
global $table_bans, $table_history, $conn;
$stmt = $conn->prepare("SELECT name,uuid FROM " . $table_history . " WHERE name=? ORDER BY date LIMIT 1");
if ($stmt->execute(array($name))) {
if ($row = $stmt->fetch()) {