By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,130 Members | 2,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,130 IT Pros & Developers. It's quick & easy.

How to get radio button value from the database

P: 1
Hi all,

I have a 2 radio button . So i want to get the selected radio button value as it is stored in the data base .

here's the code :
Expand|Select|Wrap|Line Numbers
  1.  echo"<tr>
  2.                   <td >Availability : </td>
  3.                   <td><label>Yes<input class=\"inputbox\" type =\"radio\" name=\"availability2\" size=\"40\" value=if($availability=='yes') echo 'checked=\"checked\"';</label></td>
  4.                   var_dump($availability);
  5.                   <td><label>No<input class=\"inputbox\" type =\"radio\" name=\"availability2\" size=\"40\" value=if($availability=='no') echo 'checked=\"checked\"';</label></td>
  6.       </tr>";
  7.  
the result of var_dump($availability) is var_dump(no) , i don't know were's the mistake !!
thanks for reply
Jul 23 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.