basicxman Posted June 8, 2008 Share Posted June 8, 2008 Now I have the feeling this is something completely obvious and I'm going to kick myself for not knowing this but here goes:echo '<form action="rate.php" method="post">';echo "<input type='hidden' name='title' value='$a' />";echo '<input type="radio" name="yes" value="agree" checked="checked" />Agree <br /><input type="radio" name="no" value="disagree" />Disagree';echo '<input type="submit" value="Submit" />';echo '</form>';that code works perfectly except for one problem, both radio buttons can be clicked at the same time...any idea on how to fix? is it the fact that I'm using echo to generate the radio buttons?thanks in advanced Link to comment Share on other sites More sharing options...
Ingolme Posted June 8, 2008 Share Posted June 8, 2008 Give them the same name attribute. echo '<input type="radio" name="agreement" value="yes" checked="checked" />Agree <br /><input type="radio" name="agreement" value="no" />Disagree'; Link to comment Share on other sites More sharing options...
basicxman Posted June 8, 2008 Author Share Posted June 8, 2008 lol thanks i feel like an idiot Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.