Prepopulating HTML Radio selection using php -


so based on if database value 1 or 0 want enabled/disabled api settings page radio buttons prepopulated. yet have seen online not working. ideas how work? here snippit code on how doing radio portion. keep in mind when select enable or disable , submit form change database value 1 or 0. can't selected when page loads life :| ... appreciated! status variable set 1 or 0 way!

<form action="api_settings.php"  method="post"> <table width="90%" border="0" cellspacing="0" cellpadding="6">   <tr>     status:<br />     <input type="radio" name="status"  value="0" <?php if($status == 0){?> checked="checked"<?}?> />disabled remote access<br />     <input type="radio" name="status"  value="1" <?php if($status == 1){?> checked="checked"<?}?> />enabled remote access<br />   </tr> 

i don't believe it's problem php, think problem don't have <td></td> tag within <tr></tr>.

before: http://jsfiddle.net/efyzf/ after: http://jsfiddle.net/efyzf/1/


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -