title: how to show textbox if radio button value is checked from database?
body: <p>I have 3 radio buttons </p>
  
  <pre><code>&lt;input  type="radio" name="preferedpaymt" value="CheckMailed" id="CheckMailed1" &lt;?php if($paymnt=="CheckMail") {?&gt; checked="checked" &lt;?php }?&gt; /&gt;
  (a)Check Mailed
  
  &lt;input  type="radio" name="preferedpaymt" value="PayPal"  &lt;?php if($paymnt=="PayPal") {?&gt; checked="checked" &lt;?php }?&gt; /&gt;
  (b)By PayPal
  
  &lt;input  type="radio" name="preferedpaymt" value="WireTransfer"  id="WireTransfer" &lt;?php if($paymnt=="wireTransfer") {?&gt; checked="checked" &lt;?php }?&gt; /&gt;
  (c)Wire Transfer To Bank A/c$12
  </code></pre>
  
  <p>But the value of radiobutton is checked from database . With these 2 tables are associated
  if Radiobutton 2 is checked table1 1 should populate id tb1</p>
  
  <p>here the problem is when a value of radio button is checked from database the table does not get populate if you only click it gets populated i want it automatis how can i do it?</p>
  
  <p>jquery code, which I am using</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  jQuery(function () {
      jQuery("input[name=preferedpaymt]").change(function () {
          if ($(this).val() == "PayPal") {
              jQuery("#ppl").slideDown()
          } else {
              jQuery("#ppl").slideUp();
          }
      });
  });
  &lt;/script&gt;
  </code></pre>