Hallo,
Ik wil een lijst met checkboxen creëren vanuit MySQL.
Nou weet ik wel hoe ik een checkbox op een statische pagina moet maken, maar ik kom er eigenlijk niet echt uit hoe dat in PHP moet.
Ik heb nu het volgende:
<?php
$pid= "ID";
$name = "Product_title";
$comments = "Product_info";
$checkbox = "<input type="checkbox" name="checkbox" value="Yes />";
//-----While loop witch execute the query-------------------------------------
while ($rows = mysql_fetch_assoc($result)) {
echo '<ul>';
echo '<li>' . '<a href="RCwebsite-index.php?id=' . $rows[$pid] . '">Name: ' . $rows[$name] . '</a><br />'
. 'Comment: ' . $rows[$comments] . 'Checkbox: ' . $rows[$checkbox] . '</li>' ;
echo '</ul>';
}
?>
Kan iemand mij verder helpen.
Bij voorbaat dank, Tom
1.492 views