SAEWEB2.2/ci/application/views/artistes_list.php

21 lines
750 B
PHP

<section class="artiste">
<?php
foreach($artistes as $artiste){
echo "<form action='" . base_url("index.php/artistes/addSongOfArtistToPlaylist") . "' method='post'>";
echo anchor("artistes/view/{$artiste->id}", "{$artiste->name}");
if ($this->session->userdata('logged')):
echo "<select name='playlist'>";
foreach ($playlists as $playlist) {
echo "<option value='{$playlist->id}'>{$playlist->name}</option>";
}
echo "</select>";
echo "<input type='hidden' name='artistId' value='{$artiste->id}' />"; // Utilisez l'identifiant de l'artiste ici
echo "<button type='submit' class='add-to-playlist'>+</button>";
echo "</form>";
endif;
echo "<br>";
}
?>
</section>