Vi chiedo gentilmente di aiutarmi ad inserire più submit in una tabella php, assegnando un pulsante CANCELLA. Vorrei assegnare un ID ad ogni riga di dati in cui c'è un CANCELLA.
Vi passo il mio script:
<?php
if (isset ($VENDI)) {
if ($number<>0) {
$query = "SELECT *
FROM tabella_files
";
$risultato = mysql_query($query) or die(mysql_error());
$number = mysql_numrows($risultato);
echo "<table border=\"1\" bgcolor=\"#2D2D2D\" align=\"left\"><tr>
<th><font color=\"white\">FOTO</font></th>
<th><font color=\"white\">TIPO</font></th>
<th><font color=\"white\">MARCA</font></th>
<th><font color=\"white\">PREZZO</font></th>
<th><font color=\"white\">ELIMINA</font></th>
</tr>";
for($i=0;$i<$number;$i++){
$tipo=mysql_result ($risultato,$i, "tipo");
$marca=mysql_result ($risultato,$i, "marca");
$prezzo=mysql_result ($risultato,$i, "prezzo");
$note=mysql_result ($risultato,$i, "note");
$id_file=mysql_result ($risultato,$i, "id_file");
$nome_file=mysql_result ($risultato,$i, "nome_file");
$tipo_file=mysql_result ($risultato,$i, "tipo_file");
$dati_file=mysql_result ($risultato,$i, "dati_file");
echo "<tr>
<td><a href=\"mostra.php?id=$id_file\" target=\"_black\"><img src=\"image1.gif\"></a></td>
<td><font color=\"white\">$tipo</font></td>
<td><font color=\"white\">$marca</font></td>
<td><font color=\"white\">$prezzo</font></td>
<td><input type=\"submit\" name=\"ELIMINA\" value=\"ELIMINA\"></td>
</tr>";
}
}
echo "</table>";
}
?>
Grazie a tutti, Cristina.