Jump to content

can you change a pre-selected radio button?


DamienRoche

Recommended Posts

Not sure where this should go. Will probably be moved...

 

I have this code that constructs my radio buttons:

 

<?php while($fetcha = mysql_fetch_array($answers)){ ?>

<div class="survey-a-wrap"><div class="ansback">

<input <?php if($selqid == $fetcha['ansid']){echo "checked='checked' ";}?>

class="radbut" type="radio" name="<?php echo $qid; ?>" 

value="<?php echo $fetcha['ansid']; ?>"/>

<?php echo $fetcha['answer'];?></div></div>

<?php } ?>

 

No need to tutor me on my style of coding. This suits my needs when using ide's.

 

Any way, as you can see, I have a conditional that if true has the radio button pre-selected. The problem is, I can't seem to change the value on *any* pre-selected radio button.

 

I've even checked by dumping all POST,GET & REQUEST variables but my new selection, other than the pre-selected one isn't submitted.

 

Any ideas?

 

Thanks.

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.