Display database fields as checkboxes
<p>I'm trying to display all my database fields like radio buttons. For example I have this database fields :</p>

<pre><code>hostess_id
hostess_name_en
hostess_surname_en
... etc ...
</code></pre>

<p>I want to display them as radio buttons, in order to select them, then display data information only for the selected buttons.</p>

<p>How can I do that?
I have something like this:</p>

<pre><code>&lt;?php
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
    die('Could not connect to MySQL server: ' . mysql_error());
}
$dbname = 'db_up';
$db_selected = mysql_select_db($dbname, $link);
if (!$db_selected) {
    die("Could not set $dbname: " . mysql_error());
}
$res = mysql_query('select * from hostess', $link);

while ($row = mysql_fetch_assoc($result)){

  echo "&lt;td&gt;&lt;input type=\'checkbox\' name=\'hostess[]\' value=\'" . $row['hostess_id'] . "\'&gt;" . $row['hostess_firstname_en'] . "&lt;br /&gt;";

}


?&gt;
</code></pre>
