<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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 9년 전 | 441 | ||
| 7829 |
|
9년 전 | 625 | |
| 7828 | 10년 전 | 553 | ||
| 7827 | 10년 전 | 448 | ||
| 7826 | 10년 전 | 452 | ||
| 7825 | 10년 전 | 494 | ||
| 7824 | 10년 전 | 456 | ||
| 7823 | 10년 전 | 402 | ||
| 7822 | 10년 전 | 376 | ||
| 7821 | 10년 전 | 323 | ||
| 7820 | 10년 전 | 359 | ||
| 7819 |
|
10년 전 | 756 | |
| 7818 | 10년 전 | 405 | ||
| 7817 | 10년 전 | 540 | ||
| 7816 | 10년 전 | 423 | ||
| 7815 | 10년 전 | 621 | ||
| 7814 | 10년 전 | 450 | ||
| 7813 | 10년 전 | 400 | ||
| 7812 | 10년 전 | 413 | ||
| 7811 | 10년 전 | 403 | ||
| 7810 | 10년 전 | 584 | ||
| 7809 | 10년 전 | 517 | ||
| 7808 | 10년 전 | 393 | ||
| 7807 | 10년 전 | 423 | ||
| 7806 |
프로그래머7
|
10년 전 | 1345 | |
| 7805 | 10년 전 | 1290 | ||
| 7804 |
zahir1312
|
10년 전 | 790 | |
| 7803 |
|
10년 전 | 1386 | |
| 7802 | 10년 전 | 474 | ||
| 7801 | 10년 전 | 871 | ||
| 7800 | 10년 전 | 1092 | ||
| 7799 | 10년 전 | 571 | ||
| 7798 | 10년 전 | 526 | ||
| 7797 | 10년 전 | 529 | ||
| 7796 | 10년 전 | 370 | ||
| 7795 | 10년 전 | 524 | ||
| 7794 | 10년 전 | 572 | ||
| 7793 | 10년 전 | 1069 | ||
| 7792 | 10년 전 | 491 | ||
| 7791 | 10년 전 | 572 | ||
| 7790 | 10년 전 | 521 | ||
| 7789 |
fbastore
|
10년 전 | 1459 | |
| 7788 | 10년 전 | 560 | ||
| 7787 | 10년 전 | 418 | ||
| 7786 | 10년 전 | 610 | ||
| 7785 | 10년 전 | 604 | ||
| 7784 | 10년 전 | 657 | ||
| 7783 | 10년 전 | 466 | ||
| 7782 | 10년 전 | 506 | ||
| 7781 | 10년 전 | 912 | ||
| 7780 | 10년 전 | 833 | ||
| 7779 | 10년 전 | 782 | ||
| 7778 | 10년 전 | 371 | ||
| 7777 | 10년 전 | 476 | ||
| 7776 | 10년 전 | 470 | ||
| 7775 | 10년 전 | 417 | ||
| 7774 | 10년 전 | 637 | ||
| 7773 | 10년 전 | 394 | ||
| 7772 | 10년 전 | 751 | ||
| 7771 | 10년 전 | 403 | ||
| 7770 | 10년 전 | 656 | ||
| 7769 | 10년 전 | 404 | ||
| 7768 | 10년 전 | 626 | ||
| 7767 | 10년 전 | 1187 | ||
| 7766 | 10년 전 | 502 | ||
| 7765 | 10년 전 | 553 | ||
| 7764 |
잘살아보자
|
10년 전 | 411 | |
| 7763 |
|
10년 전 | 1472 | |
| 7762 |
Tosea
|
10년 전 | 1073 | |
| 7761 | 10년 전 | 666 | ||
| 7760 |
잘살아보자
|
10년 전 | 702 | |
| 7759 |
잘살아보자
|
10년 전 | 533 | |
| 7758 |
잘살아보자
|
10년 전 | 611 | |
| 7757 | 10년 전 | 1252 | ||
| 7756 |
ITBANK
|
10년 전 | 1268 | |
| 7755 | 10년 전 | 1936 | ||
| 7754 | 10년 전 | 1070 | ||
| 7753 | 10년 전 | 897 | ||
| 7752 | 10년 전 | 1409 | ||
| 7751 |
잘살아보자
|
10년 전 | 551 | |
| 7750 |
잘살아보자
|
10년 전 | 490 | |
| 7749 |
잘살아보자
|
10년 전 | 502 | |
| 7748 |
잘살아보자
|
10년 전 | 517 | |
| 7747 |
잘살아보자
|
10년 전 | 604 | |
| 7746 |
잘살아보자
|
10년 전 | 689 | |
| 7745 |
잘살아보자
|
10년 전 | 929 | |
| 7744 |
잘살아보자
|
10년 전 | 429 | |
| 7743 | 10년 전 | 959 | ||
| 7742 |
starbros
|
10년 전 | 851 | |
| 7741 |
잘살아보자
|
10년 전 | 684 | |
| 7740 |
잘살아보자
|
10년 전 | 558 | |
| 7739 |
잘살아보자
|
10년 전 | 473 | |
| 7738 |
잘살아보자
|
10년 전 | 550 | |
| 7737 |
잘살아보자
|
10년 전 | 521 | |
| 7736 |
잘살아보자
|
10년 전 | 539 | |
| 7735 |
잘살아보자
|
10년 전 | 865 | |
| 7734 |
잘살아보자
|
10년 전 | 438 | |
| 7733 |
잘살아보자
|
10년 전 | 553 | |
| 7732 |
잘살아보자
|
10년 전 | 712 | |
| 7731 |
잘살아보자
|
10년 전 | 630 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기