Asheeown Posted August 7, 2007 Share Posted August 7, 2007 <input type=\"radio\" name=\"RadioGroup2\" value=\"Down\"> Downed <input name=\"RadioGroup2\" type=\"radio\" value=\"Up\" checked> Still Standing It's inside a while statement, and it echoes fine, the buttons are intact and the code shows it checked on the source, however it's just not selecting either button, any ideas? Link to comment https://forums.phpfreaks.com/topic/63679-solved-radio-group-inside-a-while-statement-wont-check/ Share on other sites More sharing options...
Daniel0 Posted August 7, 2007 Share Posted August 7, 2007 Did you clear your cache after changing the code? Ctrl+F5. If you refresh normally then the browser will select whatever was selected before. Link to comment https://forums.phpfreaks.com/topic/63679-solved-radio-group-inside-a-while-statement-wont-check/#findComment-317353 Share on other sites More sharing options...
tibberous Posted August 7, 2007 Share Posted August 7, 2007 That, echo'ed out, showed up as the select button being checked. Only thing I can think to tell you is to view source and make sure thats right, and if you are using Firefox, close and reopen the page (don't refresh). Link to comment https://forums.phpfreaks.com/topic/63679-solved-radio-group-inside-a-while-statement-wont-check/#findComment-317355 Share on other sites More sharing options...
tibberous Posted August 7, 2007 Share Posted August 7, 2007 Did you clear your cache after changing the code? Ctrl+F5. If you refresh normally then the browser will select whatever was selected before. I think only Firefox does that (IE doesn't anyway) - but I'm guessing that might be the problem. Link to comment https://forums.phpfreaks.com/topic/63679-solved-radio-group-inside-a-while-statement-wont-check/#findComment-317356 Share on other sites More sharing options...
Asheeown Posted August 7, 2007 Author Share Posted August 7, 2007 Actually I decided to scroll down a bit to the last record, and it is correctly checked, but my if statement is inside the while so it should be checking all of them right? Link to comment https://forums.phpfreaks.com/topic/63679-solved-radio-group-inside-a-while-statement-wont-check/#findComment-317358 Share on other sites More sharing options...
Daniel0 Posted August 7, 2007 Share Posted August 7, 2007 Actually I decided to scroll down a bit to the last record, and it is correctly checked, but my if statement is inside the while so it should be checking all of them right? Well, we haven't seen your code, so we can't tell. Link to comment https://forums.phpfreaks.com/topic/63679-solved-radio-group-inside-a-while-statement-wont-check/#findComment-317359 Share on other sites More sharing options...
Asheeown Posted August 7, 2007 Author Share Posted August 7, 2007 while($BossRow = mysql_fetch_array($BossQuery)) { extract($BossRow); $Boss = $Name; if($Status = "Up") { $Checked3 = "checked"; } else { $Checked4 = "checked"; } <input type=\"radio\" name=\"RadioGroup2\" value=\"Down\" $Checked3> Downed <input name=\"RadioGroup2\" type=\"radio\" value=\"Up\" $Checked4> Still Standing I skipped everything in between and under it since it has nothing to do with this, this is the code im using to determine if it should be checked or not Link to comment https://forums.phpfreaks.com/topic/63679-solved-radio-group-inside-a-while-statement-wont-check/#findComment-317360 Share on other sites More sharing options...
tibberous Posted August 7, 2007 Share Posted August 7, 2007 $Status = "Up" is always true. You mean $Status == "Up"? Link to comment https://forums.phpfreaks.com/topic/63679-solved-radio-group-inside-a-while-statement-wont-check/#findComment-317364 Share on other sites More sharing options...
Asheeown Posted August 7, 2007 Author Share Posted August 7, 2007 Ohh caught me there I never think of the smallest things, thanks a lot Link to comment https://forums.phpfreaks.com/topic/63679-solved-radio-group-inside-a-while-statement-wont-check/#findComment-317370 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.