Link to home
Start Free TrialLog in
Avatar of doctorbill
doctorbillFlag for United Kingdom of Great Britain and Northern Ireland

asked on

PHP Radio Issue

 
    <input type="radio" name="units" id="cms" value="cm" class="validate[condRequired[im_size_port]] text-input"
<?php if ($row_artgaladd[artgal_sizeUnit] == "cm") { ?>
      checked="checked" <?php } ?>  />
    cm
    </label>
    &nbsp;<input type="radio" name="units" id="inches" value="inches" class="validate[condRequired[im_size_land]] text-input"
<?php if ($row_artgaladd[artgal_sizeUnit] == "inches") { ?>
      checked="checked" <?php } ?> />
    inches

can someone please tell me what is wrong with the script above
The radio buttons do not reflect the statue dof the current radio checked, even though the database entries are correct
SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of doctorbill

ASKER

quotes make no difference at all - sorry
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ray
Can you explain this:

Take the "checked" attribute out and try it again, using the client input instead of pre-populating the HTML with what might be bad code.

Do I take out the following:
<?php if ($row_artgaladd[artgal_sizeUnit] == "cm") { ?>
      checked="checked" <?php } ?>  />
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry all
Thanks very much for the valuable information

I have to confess I made an error. I was editing 2 php pages at once , both with very similar names. The one I was editing was not the one I was checking in my browser, hence any changes were not being reflected in the browser page
The script I posted is actually working fine

Once again - sorry foe being such a twit
Solution already there
Valuable information