Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Question on draw radio field


cgchris99

Recommended Posts

I have this line of code

 

<?php echo tep_draw_radio_field('customers_resale', '1', false, $cInfo->customers_resale) . '  ' . YES . '  ' . tep_draw_radio_field('customers_resale', '0', false, $cInfo->customers_resale) . '  ' . NO; ?>

 

Why does it show the YES radio button marked/checked when the field value is a 1, but doesn't show the NO radio button marked when the field is a 0

 

Thanks for any help

Link to comment
Share on other sites

Did you try the vice-versa-method ?

 

Simply saying: If the ione entry is 0 the other one is 1 and vice-versa.

 

HTH

You can't have everything. That's why trains have difficulty crossing oceans, and hippos did not adapt to fly. -- from the OpenBSD mailinglist.

Link to comment
Share on other sites

If I swap the 1 & 0 then only the 'NO' shows up marked and the 'YES' never gets marked.

 

It will when I click on it and then update the record. But when I re-load the record then neither is marked if the real value is 0. But if the value is 0 then neither is marked.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...