Detailed implementation of php selectradio and checkbox selected by default
- 2020-06-23 00:03:25
- OfStack
This is the implementation chosen by default by select extending yibing
The default selection implementation for the radio radio box
The default selection implementation of the checkbox check box
<select name="wuyeleixing" size="1">
<option <?php if($myrow[wuyeleixing]==1) echo("selected");?> value="1"> residential </option>
<option <?php if($myrow[wuyeleixing]==2) echo("selected");?> value="2"> The office </option>
<option <?php if($myrow[wuyeleixing]==3) echo("selected");?> value="3"> YingYeFang </option>
<option <?php if($myrow[wuyeleixing]==4) echo("selected");?> value="4"> workshop </option>
<option <?php if($myrow[wuyeleixing]==5) echo("selected");?> value="5"> warehouse </option>
<option <?php if($myrow[wuyeleixing]==6) echo("selected");?> value="6"> plot </option>
<option <?php if($myrow[wuyeleixing]==7) echo("selected");?> value="7"> Complex building </option>
<option <?php if($myrow[wuyeleixing]==8) echo("selected");?> value="8"> Cattle ranches </option>
<option <?php if($myrow[wuyeleixing]==9) echo("selected");?> value="9"> mass </option>
<option <?php if($myrow[wuyeleixing]==10) echo("selected");?> value="10"> The hotel restaurant </option>
<option <?php if($myrow[wuyeleixing]==11) echo("selected");?> value="11"> School buildings </option>
</select>
The default selection implementation for the radio radio box
<input type="radio" name="dishu" value="3" <?php if($myrow[dishu]==3) echo("checked");?>> blank
<input type="radio" name="dishu" value="1" <?php if($myrow[dishu]==1) echo("checked");?>> transfer
<input type="radio" name="dishu" value="2" <?php if($myrow[dishu]==2) echo("checked");?>> transfer
<input type="radio" name="dishu" value="4" <?php if($myrow[dishu]==4) echo("checked");?>> The collective
The default selection implementation of the checkbox check box
<input name="fujia_jiaju" type="checkbox" value="jiaju" <?php if($myrow[fujia_jiaju]) echo("checked");?>></font></strong> home with </td>
<td width="108" height="1"><strong><font color="#008080" face=" Regular script _GB2312"><input
name="fujia_chuju" type="checkbox" value="chuju" <?php if($myrow[fujia_chuju]) echo("checked");?>></font></strong> kitchen with </td>
<td width="96" height="1"><strong><font color="#008080" face=" Regular script _GB2312"><input
name="fujia_woju" type="checkbox" value="woju" <?php if($myrow[fujia_woju]) echo("checked");?>></font></strong> lying with </td>
<td width="99" height="1"><strong><font color="#008080" face=" Regular script _GB2312"><input
name="fujia_TV" type="checkbox" value="TV" <?php if($myrow[fujia_TV]) echo("checked");?>></font></strong> The TV