problem presenting dynamic php data in a non-text elements
Posted on 2007-03-21
i have a database table called "people" and the fields are:"name","isactor","isdirector","age".
i have no problem to echo the name and the age in a text field.
but i want that is the person is an actor or a director it will show in a checkbox or a radio button. so one will be selected while the other will not be selected.
so i wrote this code:
<td>is he an actor:</td>
<input name="radio3" type="checkbox" value="<?php echo $row_peopleQ['people_isactor']; ?>" />
<td>is he a director: </td>
<input name="radio4" type="checkbox" value="<?php echo $row_peopleQ['people_isdirector']; ?>" />
but while the name and the age are presented the checkboxes are not selected, even though that when i replaced them with textfields the correct values are presented.
can anyone help me? how do i present dynamic data in non-text elements?