Forum Moderators: coopster
I have a small problem. I have got a simple form that has one row in a while loop that presents data from a specified database, in this row i have two radio buttons, one with the value of 'yes', and the other, 'no', the idea is that one of the colums in the database is holding the value either yes or no. But when i try to echo this effect to the screen using an if() clause, rather than a ternary operator, which is successful - when i have the two options both set to 'no', or 'yes', only the first instance of gets echoed, the second is ignored.
this is how the code is written:
if ($row->viewable == "yes")
{
echo '<input type="radio" checked value="yes" name="[]">';
echo '<input type="radio" value="no" name="[]">';
}
else
{
echo...inverted of the other
}
could anyone advise on what im doing wrong.
Thanks
Odd