login 2
This commit is contained in:
parent
5089f0cd33
commit
686aaaa8be
@ -9,8 +9,13 @@ class Albums extends CI_Controller {
|
||||
}
|
||||
|
||||
public function index(){
|
||||
$genre = $this->model_music->getGenre();
|
||||
$albums = $this->model_music->getAlbums($genre);
|
||||
$selectedGenre = '0'; // Valeur par défaut pour le genre si aucun n'est sélectionné
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
if(isset($_POST['Genre'])){
|
||||
$selectedGenre = $_POST['Genre'];
|
||||
}
|
||||
}
|
||||
$albums = $this->model_music->getAlbums($selectedGenre);
|
||||
$playlists = $this->model_music->getPlaylist();
|
||||
$this->load->view('layout/header');
|
||||
$this->load->view('albums_list', ['albums' => $albums, 'playlists' => $playlists]);
|
||||
|
Loading…
Reference in New Issue
Block a user