<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년 전 | 667 | ||
| 7629 |
|
10년 전 | 2409 | |
| 7628 | 10년 전 | 800 | ||
| 7627 |
|
10년 전 | 1042 | |
| 7626 |
|
10년 전 | 1799 | |
| 7625 | 10년 전 | 723 | ||
| 7624 | 10년 전 | 741 | ||
| 7623 |
|
10년 전 | 3115 | |
| 7622 | 10년 전 | 745 | ||
| 7621 |
leeleeleelee
|
10년 전 | 594 | |
| 7620 | 10년 전 | 547 | ||
| 7619 | 10년 전 | 501 | ||
| 7618 | 10년 전 | 1039 | ||
| 7617 | 10년 전 | 733 | ||
| 7616 | 10년 전 | 665 | ||
| 7615 | 10년 전 | 734 | ||
| 7614 | 10년 전 | 1277 | ||
| 7613 |
|
10년 전 | 2090 | |
| 7612 | 10년 전 | 1169 | ||
| 7611 | 10년 전 | 1431 | ||
| 7610 |
|
10년 전 | 1909 | |
| 7609 |
|
10년 전 | 1363 | |
| 7608 |
mwdkim
|
10년 전 | 1143 | |
| 7607 |
|
10년 전 | 1069 | |
| 7606 |
mwdkim
|
10년 전 | 3948 | |
| 7605 | 10년 전 | 698 | ||
| 7604 | 10년 전 | 1037 | ||
| 7603 | 10년 전 | 1658 | ||
| 7602 |
|
10년 전 | 1088 | |
| 7601 |
AniNest
|
10년 전 | 2804 | |
| 7600 |
port443
|
10년 전 | 1045 | |
| 7599 | 10년 전 | 954 | ||
| 7598 | 10년 전 | 1035 | ||
| 7597 | 10년 전 | 4583 | ||
| 7596 |
SeungYeon
|
10년 전 | 904 | |
| 7595 |
untitled
|
10년 전 | 2445 | |
| 7594 |
프로그래머7
|
10년 전 | 1745 | |
| 7593 |
untitled
|
10년 전 | 2387 | |
| 7592 |
untitled
|
10년 전 | 1955 | |
| 7591 |
untitled
|
10년 전 | 2688 | |
| 7590 |
아리마2001
|
10년 전 | 861 | |
| 7589 | 10년 전 | 1118 | ||
| 7588 |
|
10년 전 | 2932 | |
| 7587 | 10년 전 | 1317 | ||
| 7586 | 10년 전 | 679 | ||
| 7585 | 10년 전 | 1711 | ||
| 7584 | 10년 전 | 1419 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1178 | |
| 7582 |
|
10년 전 | 1140 | |
| 7581 | 10년 전 | 1367 | ||
| 7580 | 10년 전 | 1018 | ||
| 7579 |
|
10년 전 | 614 | |
| 7578 | 10년 전 | 1439 | ||
| 7577 |
|
10년 전 | 1882 | |
| 7576 | 10년 전 | 1396 | ||
| 7575 |
멋진남자임
|
10년 전 | 1478 | |
| 7574 | 10년 전 | 2131 | ||
| 7573 | 10년 전 | 3266 | ||
| 7572 | 10년 전 | 769 | ||
| 7571 |
|
10년 전 | 790 | |
| 7570 |
|
10년 전 | 1331 | |
| 7569 | 10년 전 | 1561 | ||
| 7568 |
this1mg
|
10년 전 | 1059 | |
| 7567 |
|
10년 전 | 775 | |
| 7566 | 10년 전 | 926 | ||
| 7565 |
Angel하늘
|
10년 전 | 1024 | |
| 7564 |
seoldi
|
10년 전 | 1268 | |
| 7563 |
|
10년 전 | 1406 | |
| 7562 |
멋진남자임
|
10년 전 | 2103 | |
| 7561 | 10년 전 | 722 | ||
| 7560 |
leeleeleelee
|
10년 전 | 922 | |
| 7559 | 10년 전 | 5064 | ||
| 7558 |
RinaP
|
10년 전 | 799 | |
| 7557 |
|
10년 전 | 1265 | |
| 7556 | 10년 전 | 1205 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1676 | |
| 7554 | 10년 전 | 1104 | ||
| 7553 |
senseme
|
10년 전 | 1347 | |
| 7552 |
ehdltdoit
|
10년 전 | 1446 | |
| 7551 |
|
10년 전 | 1838 | |
| 7550 |
leeleeleelee
|
10년 전 | 1605 | |
| 7549 | 10년 전 | 2441 | ||
| 7548 | 10년 전 | 1854 | ||
| 7547 |
멋진남자임
|
10년 전 | 1973 | |
| 7546 | 10년 전 | 1017 | ||
| 7545 |
ILMare1003
|
10년 전 | 1303 | |
| 7544 |
|
10년 전 | 1262 | |
| 7543 | 10년 전 | 897 | ||
| 7542 | 10년 전 | 675 | ||
| 7541 |
울라라라우
|
10년 전 | 874 | |
| 7540 | 10년 전 | 1604 | ||
| 7539 | 10년 전 | 949 | ||
| 7538 |
|
10년 전 | 1839 | |
| 7537 | 10년 전 | 3623 | ||
| 7536 |
Gaumi
|
10년 전 | 1425 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1287 | |
| 7534 |
senseme
|
10년 전 | 1212 | |
| 7533 | 10년 전 | 1214 | ||
| 7532 | 10년 전 | 879 | ||
| 7531 | 10년 전 | 2068 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기