<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus 1.2">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<script language="javascript">
function hrewarp(menu) {
var myindex = doc.options[doc.selectedIndex].value;
location.href=myindex;
}
function OpenNoticeWin(url) {
window.open(url,"notice_win",'toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=510,height=400');
}
function member_select(){
var doc = document.teamlist.team_nm;
var Member = document.teamlist.member_nm;
<?php
//--------------------------------------------------------------------------------
// MySQL DB 접속
//--------------------------------------------------------------------------------
$connect=mysql_connect( "", "mysql", "") or die( "SQL server에 연결할 수 없습니다.");
mysql_select_db("test",$connect);
//--------------------------------------------------------------------------------
// 제일 큰 팀의 인원수를 알아낸다.
//--------------------------------------------------------------------------------
$que1="select team_nm ,count(*)
from team group by team_nm
order by 2 Desc
limit 1
" ;
$result1 = mysql_query($que1,$connect ) ;
$row1 = mysql_fetch_array($result1) ;
$member_max = $row1[1] ;
// echo $member_max : 제일 큰 팀의 인원수
//--------------------------------------------------------------------------------
// 팀이름의 목록를 알아낸다
//--------------------------------------------------------------------------------
$que2="select distinct team_nm from team " ;
$result2 = mysql_query($que2,$connect );
$team_max = mysql_num_rows($result2) ;
// echo $team_max : 팀의 수
//========== 팀이름을 루프로 돌린다.: [팀의 수만큼] =======
$row_team = mysql_fetch_array($result2);
while($row_team)
{
echo(" if (document.teamlist.team_nm.options[document.teamlist.team_nm.selectedIndex].value == '$row_team[0]') ");
echo(" {
");
//--------------------------------
// $row_team[0] 에 속하는 팀원의 목록
//---------------------------------
$que3="select member_nm from team where team_nm='$row_team[0]'" ;
$result3 = mysql_query($que3,$connect );
//======== 팀원을 작은 루프로 돌린다 [제일 큰 팀의 인원수 만큼]======
for($i=0 ; $i < $member_max ; $i++)
{
$row_member = mysql_fetch_array($result3);
//if($row_member[0])
@print("
document.teamlist.member_nm.options[$i].text = '$row_member[0]' ;
document.teamlist.member_nm.options[$i].value= '$row_member[0]' ; ");
}
//======== 작은 루프 끝 ============================================
echo(" } ");
$row_team = mysql_fetch_array($result2);
}
// ========== 큰루프 끝===========
?>
document.teamlist.member_nm.selectedIndex = 0 ;
}
</SCRIPT>
<form method="post" name=teamlist>
팀선택 <select name="team_nm" onchange="member_select()">
<?php
//====== 팀이름 목록=========
$que2="select distinct team_nm from team " ;
$result2 = mysql_query($que2,$connect );
$row_team = mysql_fetch_array($result2);
echo("<option value=''>팀선택</option>");
while($row_team)
{
echo("<option value='$row_team[0]'>$row_team[0]</option>");
$row_team = mysql_fetch_array($result2);
}
?>
</select>
팀원선택<select name="member_nm">
<?php
for($i=0 ; $i < $member_max ; $i++ )
{
echo("<option value=''></option>");
}
?>
</font>
</select>
</form>
</BODY>
</HTML>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7630 | 10년 전 | 671 | ||
| 7629 |
|
10년 전 | 2422 | |
| 7628 | 10년 전 | 808 | ||
| 7627 |
|
10년 전 | 1045 | |
| 7626 |
|
10년 전 | 1802 | |
| 7625 | 10년 전 | 731 | ||
| 7624 | 10년 전 | 747 | ||
| 7623 |
|
10년 전 | 3122 | |
| 7622 | 10년 전 | 747 | ||
| 7621 |
leeleeleelee
|
10년 전 | 601 | |
| 7620 | 10년 전 | 550 | ||
| 7619 | 10년 전 | 512 | ||
| 7618 | 10년 전 | 1050 | ||
| 7617 | 10년 전 | 736 | ||
| 7616 | 10년 전 | 671 | ||
| 7615 | 10년 전 | 738 | ||
| 7614 | 10년 전 | 1278 | ||
| 7613 |
|
10년 전 | 2094 | |
| 7612 | 10년 전 | 1177 | ||
| 7611 | 10년 전 | 1436 | ||
| 7610 |
|
10년 전 | 1916 | |
| 7609 |
|
10년 전 | 1371 | |
| 7608 |
mwdkim
|
10년 전 | 1146 | |
| 7607 |
|
10년 전 | 1078 | |
| 7606 |
mwdkim
|
10년 전 | 3953 | |
| 7605 | 10년 전 | 703 | ||
| 7604 | 10년 전 | 1040 | ||
| 7603 | 10년 전 | 1663 | ||
| 7602 |
|
10년 전 | 1094 | |
| 7601 |
AniNest
|
10년 전 | 2810 | |
| 7600 |
port443
|
10년 전 | 1050 | |
| 7599 | 10년 전 | 957 | ||
| 7598 | 10년 전 | 1037 | ||
| 7597 | 10년 전 | 4585 | ||
| 7596 |
SeungYeon
|
10년 전 | 907 | |
| 7595 |
untitled
|
10년 전 | 2450 | |
| 7594 |
프로그래머7
|
10년 전 | 1747 | |
| 7593 |
untitled
|
10년 전 | 2387 | |
| 7592 |
untitled
|
10년 전 | 1956 | |
| 7591 |
untitled
|
10년 전 | 2692 | |
| 7590 |
아리마2001
|
10년 전 | 868 | |
| 7589 | 10년 전 | 1120 | ||
| 7588 |
|
10년 전 | 2937 | |
| 7587 | 10년 전 | 1319 | ||
| 7586 | 10년 전 | 684 | ||
| 7585 | 10년 전 | 1719 | ||
| 7584 | 10년 전 | 1423 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1187 | |
| 7582 |
|
10년 전 | 1148 | |
| 7581 | 10년 전 | 1375 | ||
| 7580 | 10년 전 | 1026 | ||
| 7579 |
|
10년 전 | 618 | |
| 7578 | 10년 전 | 1440 | ||
| 7577 |
|
10년 전 | 1886 | |
| 7576 | 10년 전 | 1399 | ||
| 7575 |
멋진남자임
|
10년 전 | 1481 | |
| 7574 | 10년 전 | 2138 | ||
| 7573 | 10년 전 | 3275 | ||
| 7572 | 10년 전 | 776 | ||
| 7571 |
|
10년 전 | 796 | |
| 7570 |
|
10년 전 | 1337 | |
| 7569 | 10년 전 | 1565 | ||
| 7568 |
this1mg
|
10년 전 | 1063 | |
| 7567 |
|
10년 전 | 780 | |
| 7566 | 10년 전 | 929 | ||
| 7565 |
Angel하늘
|
10년 전 | 1030 | |
| 7564 |
seoldi
|
10년 전 | 1274 | |
| 7563 |
|
10년 전 | 1414 | |
| 7562 |
멋진남자임
|
10년 전 | 2112 | |
| 7561 | 10년 전 | 731 | ||
| 7560 |
leeleeleelee
|
10년 전 | 928 | |
| 7559 | 10년 전 | 5068 | ||
| 7558 |
RinaP
|
10년 전 | 806 | |
| 7557 |
|
10년 전 | 1270 | |
| 7556 | 10년 전 | 1209 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1679 | |
| 7554 | 10년 전 | 1107 | ||
| 7553 |
senseme
|
10년 전 | 1354 | |
| 7552 |
ehdltdoit
|
10년 전 | 1452 | |
| 7551 |
|
10년 전 | 1845 | |
| 7550 |
leeleeleelee
|
10년 전 | 1614 | |
| 7549 | 10년 전 | 2447 | ||
| 7548 | 10년 전 | 1855 | ||
| 7547 |
멋진남자임
|
10년 전 | 1974 | |
| 7546 | 10년 전 | 1020 | ||
| 7545 |
ILMare1003
|
10년 전 | 1311 | |
| 7544 |
|
10년 전 | 1265 | |
| 7543 | 10년 전 | 901 | ||
| 7542 | 10년 전 | 681 | ||
| 7541 |
울라라라우
|
10년 전 | 878 | |
| 7540 | 10년 전 | 1608 | ||
| 7539 | 10년 전 | 953 | ||
| 7538 |
|
10년 전 | 1842 | |
| 7537 | 10년 전 | 3628 | ||
| 7536 |
Gaumi
|
10년 전 | 1434 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1292 | |
| 7534 |
senseme
|
10년 전 | 1217 | |
| 7533 | 10년 전 | 1221 | ||
| 7532 | 10년 전 | 883 | ||
| 7531 | 10년 전 | 2074 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기