-GS-Master
Erfahrenes Mitglied
Folgender Code gibt zwar wie gewünscht so viele Textfelder aus wie Daten in der Tabelle vorhanden sind, jedoch sehen diese Alle gleich aus ...
Folgendender Code gibt diese Ausgabe aus ... [0] [1] [2] macht er nicht ...
Folgendender Code gibt diese Ausgabe aus ... [0] [1] [2] macht er nicht ...
HTML:
<tr>
<td width="40">ID:</td>
<td width="54">
<input type="text" name="number[]" value="1" size="20"?>" size="3"></td>
<td width="55">NAME:</td>
<td width="209">
<input type="text" name="name[]" value="guestbook" size="20"?>" size="20"></td>
<td width="81">ADDRESS: </td>
<td width="170">
<input type="text" name="add[]" value="?index=lol" size="20"?>" size="23"></td>
</tr>
<tr>
<td width="40">ID:</td>
<td width="54"><input type="text" name="number[]" size="3"></td>
<td width="55">NAME:</td>
<td width="209"><input type="text" name="name[]" size="20"></td>
<td width="81">ADDRESS: </td>
<td width="170"><input type="text" name="add[]" size="23"></td>
</tr>
PHP:
<?php
$select = mysql_query("SELECT * FROM navigation ORDER by id");
?>
<form id="FormName" enctype="multipart/form-data" action="<?=$_SERVER['PHP_SELF']?>" method="post" name="FormName">
<table border="0" cellspacing="2" cellpadding="3" width="627">
<tr>
<td colspan="6" width="617">
<center>
<b>Navitationsleiste</b></center>
</td>
</tr>
<?
while($r = mysql_fetch_array($select))
{
?>
<tr>
<td width="40">ID:</td>
<td width="54">
<input type="text" name="number[]" value="<?=$r["id"]?>" size="20" size="3"></td>
<td width="55">NAME:</td>
<td width="209">
<input type="text" name="name[]" value="<?=$r["name"]?>" size="20" size="20"></td>
<td width="81">ADDRESS: </td>
<td width="170">
<input type="text" name="add[]" value="<?=$r["add"]?>" size="20" size="23"></td>
</tr>
<? } ?>
<tr>
<td width="40">ID:</td>
<td width="54"><input type="text" name="number[]" size="3"></td>
<td width="55">NAME:</td>
<td width="209"><input type="text" name="name[]" size="20"></td>
<td width="81">ADDRESS: </td>
<td width="170"><input type="text" name="add[]" size="23"></td>
</tr>
<tr>
<td width="40"></td>
<td width="569" colspan="5"><input type="submit" name="senden" value="Daten speichern"></td>
</tr>
</table>
</form>
<hr>
</body>
</html>