I'm trying to create a list for group of associates by group and when a group is selected the associates assigned to that group will appear in a list
sample
Expand|Select|Wrap|Line Numbers
- <select name="groupName">
- <?php $rs_groupSearch="SELECT * FROM tblGroup";
- $groupCount=mysql_num_rows($rs_groupSearch);
- if($groupCount>0){
- while($Groups=mysql_fetch_array($rs_groupSearch)){
- ?>
- <option><?php echo $Groups['GroupName']; ?></option>
- <?php } else { ?>
- <option>No Groups in List</option>
- <?php } ?>
- </select>
Expand|Select|Wrap|Line Numbers
- <select name="groupMembers" size="4">
- <?php $rs_groupMemberSearch="SELECT * FROM tblGroupMembers
- WHERE GroupName='$groupName'"; //This is where i'm stuck
- //$groupName is the name of list box above i don't know
- //how to parse the value from that list to this sql
- $groupMemberCount=mysql_num_rows($rs_groupMemberSearch);
- if($groupMemberCount>0){
- while($GroupMembers=mysql_fetch_array($rs_groupMemberSearch)){
- ?>
- <option><?php echo $Groups['MemberName']; ?></option>
- <?php } else { ?>
- <option>No Members in List</option>
- <?php } ?>
- </select>
i have tried some examples from the net but its not working