예제 #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);
예제 #2
0
파일: index.php 프로젝트: Brunoalves3/bruno
<?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();