Basically i need to make the page display the data from one of my tables and then show the boolean as the end of each row as a check box, can someone please show me how this is done?
skoff
2:11 pm on Apr 22, 2013 (gmt 0)
if in your table you have a column with true or false written in it you could do something like this : if ($yourValue == "true") { <input type="checkbox" name="checkbox" id="checkbox1" value="$yourValue" checked /> } else { <input type="checkbox" name="checkbox" id="checkbox1" value="$yourValue" /> }
swa66
4:57 pm on Apr 22, 2013 (gmt 0)
I'd use the proper attribute of checked="checked" if you're going to go for the (xml) self closing tags.
Since it's going to be executed in a loop, I'd lose the id or make sure they are unique if you need them.
In your table you can use a true boolean instead of a string. just test it with if ...