pikemsu28 Posted September 19, 2006 Share Posted September 19, 2006 I need a point in the right direction!!!!! I have a form that has two sets of radio button groups being displayed dynamically. I want the second group to display information depending on the radio that was selected in the first group.EXAMPLE:Group 1 Group 2Clinical If Clinical Display: Team 1 Team 2Non Clinical If Non Clinical Display: Team 1 Team 2 Team 3General If General Display: Team 1 Team 2 Team 3 Team 4If someone could point me in the right direction on this it would greatly be appreciated.Thanks, JasonBTW I'm using Dreamweaver to code my PHP and using some PHP Built in functions of Dreamweaver. Quote Link to comment Share on other sites More sharing options...
craygo Posted September 19, 2006 Share Posted September 19, 2006 Give us some of your code now so we can see what you have.Ray Quote Link to comment Share on other sites More sharing options...
pikemsu28 Posted September 19, 2006 Author Share Posted September 19, 2006 [code]<?phpmysql_select_db($database_Nursing, $Nursing);$query_teams = "SELECT team FROM teams";$teams = mysql_query($query_teams, $Nursing) or die(mysql_error());$row_teams = mysql_fetch_assoc($teams);$totalRows_teams = mysql_num_rows($teams);$x = 0;do { $team[$x] = $row_teams['team'];$x++;} while ($row_teams = mysql_fetch_assoc($teams));?><form method="post" name="teams" id="teams" onSubmit="return checkRadios(this);"><table width="250" align="center" border="1"><tr><td><?php for ($y = 0; $y < $totalRows_teams; $y++) { ?><label><input type="radio" name="team" value="<?php echo $team[$y]; ?>" /><?php echo $team[$y]; ?></br></label><?php } ?></td></tr><tr align="center"><td><input name="submit" type="submit" class="bluebox" id="submit" value="Submit" /><input name="reset" type="reset" class="bluebox" id="reset" value="Reset" /></td></tr></table></form>[/code]This code generates the first radio group through the sql query. How do i get this code to display the second radio group? I know how to do the form and the loop, just how to get this radio group to dynamically populate once the first radio group is selected. Quote Link to comment Share on other sites More sharing options...
craygo Posted September 19, 2006 Share Posted September 19, 2006 how are the groups defined in the table. Do you have a group id or something???Ray Quote Link to comment Share on other sites More sharing options...
pikemsu28 Posted September 19, 2006 Author Share Posted September 19, 2006 1st group:<input type="radio" name="team" id="team" value="<?php echo $team[$y]; ?>" />2nd group:name="team_assign"since i last posted my code i did add the id="team" into my code. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.