loads lol

This commit is contained in:
Victor Giers
2019-11-22 08:19:28 +01:00
parent 00a6f05867
commit 95c6a9ab0e
6 changed files with 293 additions and 116 deletions

View File

@@ -19,10 +19,12 @@ if (isset($_POST['name']) && isset($_POST['loc']) && isset($_POST['typ'])){
if ($_POST['typ'] == 'stiftung') { $typNo = 4; }
if ($_POST['typ'] == 'festival') { $typNo = 5; }
if ($_POST['typ'] == 'kunstler') { $typNo = 6; }
$query = "INSERT INTO `institut`(`name`, `location`, `facebook`, `twitter`, `instagram`, `web`, `typ`) VALUES (\"".$_POST['name']."\",\"".$_POST['loc']."\",\"".$_POST['fb']."\",\"".$_POST['twitter']."\",\"".$_POST['insta']."\",\"".$_POST['web']."\",".$typNo.");";
//echo("<script>console.log('".$query."');</script>");
if (isset($_POST['edit'])){
$query = "UPDATE `institut` SET `name` = '".$_POST['name']."', `location` = '".$_POST['loc']."', `facebook` = '".$_POST['fb']."', `twitter` = '".$_POST['insta']."', `instagram` = '".$_POST['twitter']."', `web` = '".$_POST['web']."', `typ` = '".$typNo."' WHERE `institut`.`id` = " . $_POST['edit'] . ";";
} else {
$query = "INSERT INTO `institut`(`name`, `location`, `facebook`, `twitter`, `instagram`, `web`, `typ`) VALUES (\"".$_POST['name']."\",\"".$_POST['loc']."\",\"".$_POST['fb']."\",\"".$_POST['insta']."\",\"".$_POST['twitter']."\",\"".$_POST['web']."\",".$typNo.");";
}
mysqli_query($db, $query);
//header("location: #");
}
if (isset($_GET['delete'])){