PHP-Code:
if (!$conn) {
die("Connection failed: ".mysqli_connect_error());
}
$result = mysqli_query($conn, $sql);
mysqli_query($conn, "SET Nachname 'utf8_general_ci'");
if (mysqli_num_rows($result) > 0) {
$idnr = 1;
// output data of each row
while ($row = mysqli_fetch_assoc($result)) {
echo ' <input type="text" name="field".$idnr size="5" id="'.$idnr.
'" value="'.$row["Nr"].
' "> ';
$idnr = $idnr + 1;
echo '<input type="text" name="field".$idnr"size="20" id="'.$idnr.
'" value="'.$row["NachName"].
' ">';
$idnr = $idnr + 1;
echo ' <input type="text" name="field".$idnr" size="10" id="'.$idnr.
'" value="'.$row["VorName"].
' ">';
$idnr = $idnr + 1;
echo "<p>";
}
}
//hier möchte ich auf die einzelnen Felder zugreifen
echo field2
?>
Kommentar