Forum Moderators: coopster
:Example of the sql string populating the variable
$FLAmbulation = $Row['FLAmbulation'];
if ($FLAmbulation == 1)
{
$FLAmbulation = 'checked';
}
else
{
$FLAmbulation = '';
}
:Example of me trying to use the variable to add to the value of the checkbox.
<div style="position: absolute; left:57px; top:444px; width:86px; height:13px;">
<table width=86px height=13px border=0 cellpadding=0 cellspacing=0><tr><td valign=top align=left>
<p id=PubSt1P><span id=PubSt1F>Contracture<br></span></p>
</td></tr></table>
</div>
<div id=div414 style="position: absolute; left:36px; top:444px; width:21px; height:13px;">
<input type="checkbox" name="CHECK_BOX_3" value="Yes"
<? $FLContracture?>;>
</div>
<div id=div419 style="position: absolute; left:57px; top:456px; width:86px; height:13px;">
</div>
Please help!
Riddla
try this
$FLAmbulation = '';
if ($Row['FLAmbulation'] == 1) $FLAmbulation = ' checked';
I added a space before checked and shortened it up a bit
<input type="checkbox" name="CHECK_BOX_3" value="Yes"<?= $FLContracture?>>
the <?= is the shorthand for echoing a variable. You aren't actually outputting the value in the example you gave.