Initial commit

This commit is contained in:
mmk2410 2015-10-21 10:47:50 +02:00
parent bdecb95b7d
commit 39ff574037
19 changed files with 851 additions and 0 deletions

21
res/php/id_exists.php Normal file
View file

@ -0,0 +1,21 @@
<?php
if (!isset($_GET['id'])) {
echo "No id given!";
return;
}
$id = $_GET['id'];
include './config.php';
$conn = new mysqli($dbhost, $dbuser, $dbpassword, $dbname);
if ($conn->error) {
die("Failed to connect to the database: " . $conn->error);
}
$sql = "SELECT * FROM Titama WHERE id=$id";
$res = $conn->query($sql);
$course = $res->fetch_assoc();
if(isset($course)){
echo json_encode(true);
} else {
echo json_encode(false);
}
include './closedb.php';
?>