I am new to this, so be patient with my replies.
//$loan is defined in the PHP.class (which is shown below).
SELECT * FROM Tabel_name where loan_id = 885775
$v = array($_ldid, $_lrid);
$r = $db->Execute($q, $v);
$this->downpaymenttype = $r->fields; //<- I think I have this line done wrong because it is suppose to store the outputs to an array.
So wherever the "$loan" is in HTML page, it will take the outputs from the above statement.
The above code, which is in PHP.class file, outputs the following(or suppose to):
1 885775 Checking
2 885775 Saving
3 885775 Gift
In the HTML webpage, the following codes should check mark the boxes according to the outputs:
<input type="checkbox" name="DPS1[]" id="DPS1-{$key}" {if $loan->downpaymenttype.downpaymentsource == "Checking"} checked {/if}/>
<input type="checkbox" name="DPS2[]" id="DPS2-{$key}" {if $loan->downpaymenttype.downpaymentsource == "Saving"} checked {/if}/>
<input type="checkbox" name="DPS3[]" id="DPS3-{$key}" {if $loan->downpaymenttype.downpaymentsource == "Gift"} checked {/if}/>
But, only the "checking" checkbox is getting checked because that's the one on the first row.
Thank you for your reply. I hope it helps, if not, let me know I will post more info on Monday.