<?php /** * @author Amedeo Leo */ session_start(); require 'manageDB.php'; $idNotice = $_POST['idNotice']; $notice = getNoticeById($idNotice); $idDestinatario = $notice['idDestinatario']; $idIdea = $notice['idIdea']; $date = $notice['date']; $text = $notice['text']; $type = $notice['type']; if (updateNotice($idDestinatario, $idIdea, $date, $text, $type) == "ok") { echo "success"; }
} } if ($connection) { switch ($code) { case 1: insertRegistration($connection, $vname, $nname, $uname, $sex, $mail, $birth, $street, $hnumber, $plz, $city, $country, $picture, $password_check, $password); break; case 2: changePassword($connection, $username, $pwOld, $pwNew, $pwNewChk); break; case 3: createNotice($connection, $title, $piece, $price, $minprice, $origPrice, $categories, $actors, $date, $shipping, $payment, $datei, $username, $location); break; case 4: confirm($connection, $token, $mail); break; case 5: updateNotice($connection, $title, $piece, $price, $minprice, $origPrice, $categories, $actors, $date, $shipping, $payment, $username, $location, $id); break; case 6: contactForm($connection, $name, $email, $betreff, $categories, $message); break; default: echo "Fehler"; break; } mysqli_close($connection); } else { mysqli_close($connection); echo "DB-Connection Failed"; }