Hallo!
Habe folgendes HTML Problem.
Ich stelle den Inhalt einer MySQL-Tabelle in einem tabellarischen HTML Layout dar.
Das ganze soll auf Datensatzebene bearbeitbar sein. D.h. ich verwende pro Datensatz ein HTML-Formular. Somit wird immer nur der bearbeitete Datensatz submitted und nicht die ganze Tabelle.
Mit ein bisschen CSS und graphischen Buttons sieht das ganze sehr nett aus, funktioniert gut ist aber leider nicht korrekt da Formulare an dieser Stelle nicht erlaubt sind.
Leider weiß ich aber nicht wie ich sonst das Tabellen-Layout samt Formulare vereinen könnte.
Bitte um Anregungen! Danke!
Zum besseren Verständnis ein auf HTML/CSS beschränktes Beispiel:
<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN'
'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<style type="text/css">
*
{
margin : 0px 0px 0px 0px;
padding : 0px 0px 0px 0px;
border : 0px;
}
table
{
border-collapse : collapse;
}
td
{
border : 1px solid black;
}
</style>
</head>
<body>
<table>
<tr>
<th>Wert1</th>
<th>Wert2</th>
<th>Wert3</th>
<th>Wert4</th>
<th>Speichern</th>
<th>Löschen</th>
</tr>
<tr>
<form method='POST' action=''>
<td><input name="Wert1" value="10"></td>
<td><input name="Wert2" value="20"></td>
<td><input name="Wert3" value="30"></td>
<td><input name="Wert4" value="40"></td>
<td><input type="submit" name="sic" value="Speichern"></td>
<td><input type="submit" name="del" value="Löschen" ></td>
</form>
</tr>
<tr>
<form method='POST' action=''>
<td><input name="Wert1" value="100"></td>
<td><input name="Wert2" value="200"></td>
<td><input name="Wert3" value="300"></td>
<td><input name="Wert4" value="400"></td>
<td><input type="submit" name="sic" value="Speichern"></td>
<td><input type="submit" name="del" value="Löschen"></td>
</form>
</tr>
</table>
</body>
</html>