Beispiel #1
0
<?php

use Bruno\Controller\MusicController;
$controller = new MusicController();
$id = $_GET['id'];
if (isset($_POST['submit'])) {
    $controller->delete($id);
    header('Location: http://localhost/php');
}
if (isset($_POST['notSubmit'])) {
    header('Location: http://localhost/php');
}
$fetch = $controller->view($id);
Beispiel #2
0
<?php

use Bruno\Controller\MusicController;
$controller = new MusicController();
if (isset($_POST['submit'])) {
    $data = ['band_name' => $_POST['band_name'], 'album_name' => $_POST['album_name'], 'year' => $_POST['year']];
    $controller->add($data);
}
$dataView = $controller->view();