salve a tutti,
sorry di essere l'n-esimo a non aver capito come funziona UPDATE, ma anche dopo aver letto parecchi posts, non riesco a capire dove é l'errore.
Quello che succede é ... niente, cioé i dati non vengono aggiornati.
Ecco il codice:
Codice PHP:
<?php
echo "<form action='test.php' method='post'>";
//ändern
if($_REQUEST['action']=="upd")
{ $testid = $_POST["testid"];
mysql_query("update test set testid = $testid , name = '" . $_POST["upd"][$testid] . "' WHERE testid = $testid");
}
//Tabelle
echo "<table border>";
$res_konz_all = mysql_query("SELECT * FROM test1");
while ($dsatz = mysql_fetch_assoc($res_konz_all))
{
echo "<tr>";
echo "<td>" . $dsatz["testid"] . "</td>";
echo "<td><input name='upd[$testid]' value='" . $dsatz["name"] . "'></td>";
echo "<td class=tabval><span><a href=test.php?action=upd;id=" . $dsatz["testid"] . "><span>update</span></a></td>";
echo "</tr>";
}
echo "</table></form>";
?>
grazie per l'aiuto