Dynamic Radio Group not being marked
I have a radio group that gives the user the option to show which image they want.
The list is being pulled from a separate table and the value is inserted into the main table
Using the following code changes the picture as required,
<?php do { ?>
<label>
<input type="radio" name="RadioGroup1" value="<?php echo $row_rsHomeDonateImag['imageFile']; ?>" id="RadioGroup1_<?php echo $row_rsHomeDonateImag['imageID']; ?>" />
<img src="../homeDonateImages/<?php echo $row_rsHomeDonateImag['imageFile']; ?>" alt="" width="100" height="87" /></label>
<br />
<?php } while ($row_rsHomeDonateImag = mysql_fetch_assoc($rsHomeDonateImag)); ?>
The trouble is that when updating again, the image chosen isn't marked as Checked.
When I change the radio group to be dynamic from the proerty inspector the code is changed to this:
<?php do { ?>
<label>
<input <?php if (!(strcmp($row_WADAhomeDonatePanel['leftImage'],"<?php echo $row_rsHomeDonateImag['imageFile']; ?>"))) {echo "checked=\"checked\"";} ?> type="radio" name="RadioGroup1" value="<?php echo $row_rsHomeDonateImag['imageFile']; ?>" id="RadioGroup1_<?php echo $row_rsHomeDonateImag['imageID']; ?>" />
<img src="../homeDonateImages/<?php echo $row_rsHomeDonateImag['imageFile']; ?>" alt="" width="100" height="87" /></label>
<br />
<?php } while ($row_rsHomeDonateImag = mysql_fetch_assoc($rsHomeDonateImag)); ?>
But when I test the page it is totally blank, even the source code.
Does anyone know what the problem could be.