Repeating region - radio buttons not working

OK, I want to update records if an apartment has been rented or not. First step is displaying the records, right? So (using Dreamweaver) I have this:

        <?php 
		do { ?>
        <tr>
          <td><?php echo $row_rs_rent['unitnum']; ?></td>
          <td><label>
            <input <?php if (!(strcmp($row_rs_rent['rent_status'],"1"))) {echo "CHECKED";} ?> type="radio" name="rent_status" value="1">
        Rented</label>
              <label>
              <input <?php if (!(strcmp($row_rs_rent['rent_status'],"0"))) {echo "CHECKED";} ?> type="radio" name="rent_status" value="0">
        Vacant</label>
		</td>
        </tr>
        <?php	} while ($row_rs_rent = mysql_fetch_assoc($rs_rent)); ?>

This displays the unit numbers and radio buttons for each unit. However, only the button for the last record shows a value, everything else is empty. I tried var_dump($row_rs_rent[‘rent_status’]); and got the following:

string(1) “0”
string(1) “1”
string(1) “1”
string(1) “0”
string(1) “1”
string(1) “1”
string(1) “0”

which tells me the array is properly filled. So why doesn’t it display anything except the last record?

All the radio buttons have the same name, which puts them all in the same radio group.
Only one radio button is allowed to be selected from any radio group.

You may also want to use a while loop instead of a do…while loop, as currently $row_rs_rent will be empty on the first time through.

Thanks, I changed the name of the radio buttons to include the unitnum and that worked perfectly. The do…while loops does seem to be fine though, the first record is showing correctly.