| Newsgroups |
php.notes |
| Message-ID |
<[email protected]> |
<?php
foreach($result as $row) {
// Iteration über alle Datensätze -> Ergebnis ist ein 1-dimensionales assoziatives Array
// print_r($result); // Ausgabe des Arrays zu Testzwecken
echo "<tr>";
// Werte in einer Table-row ausgeben
echo "<td>" . $row['productName'] . "</td>";
echo "<td>" . $row['productScale'] . "</td>";
echo "<td>" . $row['quantityInStock'] . "</td>";
echo "<td>" . $row['buyPrice'] . "</td>";
// STEP 3: Link per mit GET auf einzelnen Datensatz
echo "<td><a href='?id=" . $row['productCode'] . "'>Löschen</a></td>";
echo "<td><input type='checkbox' name='del[]' value='" . $row['productCode'] . "'></td>";
echo "</tr>";
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 193.170.70.27)
----
Manual Page -- https://php.net/manual/en/language.operators.php
Edit -- https://main.php.net/note/edit/130202
Del: integrated -- https://main.php.net/note/delete/130202/integrated
Del: useless -- https://main.php.net/note/delete/130202/useless
Del: bad code -- https://main.php.net/note/delete/130202/bad+code
Del: spam -- https://main.php.net/note/delete/130202/spam
Del: non-english -- https://main.php.net/note/delete/130202/non-english
Del: in docs -- https://main.php.net/note/delete/130202/in+docs
Del: other reasons-- https://main.php.net/note/delete/130202
Reject -- https://main.php.net/note/reject/130202
Search -- https://main.php.net/manage/user-notes.php