Skip to content
Permalink
4d7e9c4a28
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
21 lines (21 sloc) 602 Bytes
<?php
session_start();
if(!$_SESSION['userid']){
session_destroy();
header('Location: index.php');
exit;
}
if($_GET['check']){
include('dbconnect.php');
$id = $dbc->real_escape_string($_GET['check']);
$checkmaid = $dbc->query("select concat(nachname, ', ', vorname) as name from mitarbeiter where maID = '$id';");
$result = $checkmaid->fetch_assoc();
if($result){
echo "0schon belegt: $result[name]";
}else{
echo "1frei!";
}
}else{
echo "0keine ID eingegeben!";
}
?>