header('Location: test.php'); } //haalt de film formulier op waarbij veranderingen kunnen doorgevoerd if (isset($_GET['aanpassen'])) { include 'test.php'; include 'form.php'; } if (isset($_POST['Trailer']) or isset($_POST['Plot'])) { include 'film.php'; $db = new database(); $gebruiker = new filmpje($db); if (!empty($_POST['Trailer']) and !empty($_POST['Plot'])) { $update = $gebruiker->update_trailer_omschrijving($_GET['form1'], $_POST['Trailer'], $_POST['Plot']); header('Location: test.php '); } elseif (empty($_POST['Trailer']) and !empty($_POST['Plot'])) { $update = $gebruiker->update_omschrijving($_GET['form1'], $_POST['Plot']); header('Location: test.php '); } elseif (empty($_POST['Plot']) and !empty($_POST['Trailer'])) { $update = $gebruiker->update_Trailer($_GET['form1'], $_POST['Trailer']); header('Location: test.php '); } } if (isset($_POST['filmnaam']) and $_POST['filmnaam'] != '') { include 'film.php'; $db = new database(); $gebruiker = new filmpje($db); $filmnaam = urlencode($_POST["filmnaam"]); $QR = "https://chart.googleapis.com/chart?cht=qr&chs=100x100&chl={$filmnaam}"; $get_film = $gebruiker->zoek_films($filmnaam); $sla_op = $gebruiker->sla_op($get_film->Title, $get_film->Genre, $get_film->Actors, $get_film->Runtime, $get_film->Plot, $get_film->Poster, $get_film->Released, $QR); header('Location: test.php');