Codice PHP:
while(mysqli_stmt_fetch($stmt)){
<form name='formPrestito' method='post' action='supporto_prestito.php'><input type='hidden' name='selected' value=$id><input type='submit' value='Restituisci' name='giveBack'>}
Non funziona comunque. Se ad esempio nella tabella ho un film con id 2 e l'altro con id 5, anche quando clicco su 2, restituisce sempre 5 quando prendo i dati. E' tutto all'interno del while, quindi cambia ( e l'ho notato anche nel sorgente).
Ad esempio se provo a stampare l'id selezionato:
Codice PHP:
if(isset($_REQUEST["giveBack"])){
if(isset($_REQUEST["selected"])){
echo "".$_REQUEST['selected'];}
}
Sempre l'ultimo mi da.