<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년 전 | 376 | ||
| 7829 |
|
9년 전 | 554 | |
| 7828 | 9년 전 | 487 | ||
| 7827 | 9년 전 | 372 | ||
| 7826 | 9년 전 | 381 | ||
| 7825 | 9년 전 | 434 | ||
| 7824 | 9년 전 | 417 | ||
| 7823 | 9년 전 | 321 | ||
| 7822 | 9년 전 | 316 | ||
| 7821 | 9년 전 | 262 | ||
| 7820 | 9년 전 | 318 | ||
| 7819 |
|
9년 전 | 719 | |
| 7818 | 10년 전 | 335 | ||
| 7817 | 10년 전 | 452 | ||
| 7816 | 10년 전 | 356 | ||
| 7815 | 10년 전 | 560 | ||
| 7814 | 10년 전 | 385 | ||
| 7813 | 10년 전 | 321 | ||
| 7812 | 10년 전 | 345 | ||
| 7811 | 10년 전 | 362 | ||
| 7810 | 10년 전 | 493 | ||
| 7809 | 10년 전 | 434 | ||
| 7808 | 10년 전 | 295 | ||
| 7807 | 10년 전 | 357 | ||
| 7806 |
프로그래머7
|
10년 전 | 1307 | |
| 7805 | 10년 전 | 1217 | ||
| 7804 |
zahir1312
|
10년 전 | 742 | |
| 7803 |
|
10년 전 | 1344 | |
| 7802 | 10년 전 | 401 | ||
| 7801 | 10년 전 | 829 | ||
| 7800 | 10년 전 | 1047 | ||
| 7799 | 10년 전 | 504 | ||
| 7798 | 10년 전 | 451 | ||
| 7797 | 10년 전 | 452 | ||
| 7796 | 10년 전 | 301 | ||
| 7795 | 10년 전 | 454 | ||
| 7794 | 10년 전 | 477 | ||
| 7793 | 10년 전 | 997 | ||
| 7792 | 10년 전 | 405 | ||
| 7791 | 10년 전 | 489 | ||
| 7790 | 10년 전 | 453 | ||
| 7789 |
fbastore
|
10년 전 | 1403 | |
| 7788 | 10년 전 | 486 | ||
| 7787 | 10년 전 | 352 | ||
| 7786 | 10년 전 | 503 | ||
| 7785 | 10년 전 | 521 | ||
| 7784 | 10년 전 | 590 | ||
| 7783 | 10년 전 | 391 | ||
| 7782 | 10년 전 | 446 | ||
| 7781 | 10년 전 | 847 | ||
| 7780 | 10년 전 | 776 | ||
| 7779 | 10년 전 | 746 | ||
| 7778 | 10년 전 | 316 | ||
| 7777 | 10년 전 | 398 | ||
| 7776 | 10년 전 | 402 | ||
| 7775 | 10년 전 | 339 | ||
| 7774 | 10년 전 | 600 | ||
| 7773 | 10년 전 | 322 | ||
| 7772 | 10년 전 | 666 | ||
| 7771 | 10년 전 | 326 | ||
| 7770 | 10년 전 | 612 | ||
| 7769 | 10년 전 | 329 | ||
| 7768 | 10년 전 | 547 | ||
| 7767 | 10년 전 | 1115 | ||
| 7766 | 10년 전 | 444 | ||
| 7765 | 10년 전 | 476 | ||
| 7764 |
잘살아보자
|
10년 전 | 325 | |
| 7763 |
|
10년 전 | 1400 | |
| 7762 |
Tosea
|
10년 전 | 1018 | |
| 7761 | 10년 전 | 614 | ||
| 7760 |
잘살아보자
|
10년 전 | 601 | |
| 7759 |
잘살아보자
|
10년 전 | 415 | |
| 7758 |
잘살아보자
|
10년 전 | 531 | |
| 7757 | 10년 전 | 1179 | ||
| 7756 |
ITBANK
|
10년 전 | 1217 | |
| 7755 | 10년 전 | 1893 | ||
| 7754 | 10년 전 | 998 | ||
| 7753 | 10년 전 | 843 | ||
| 7752 | 10년 전 | 1348 | ||
| 7751 |
잘살아보자
|
10년 전 | 470 | |
| 7750 |
잘살아보자
|
10년 전 | 440 | |
| 7749 |
잘살아보자
|
10년 전 | 437 | |
| 7748 |
잘살아보자
|
10년 전 | 419 | |
| 7747 |
잘살아보자
|
10년 전 | 509 | |
| 7746 |
잘살아보자
|
10년 전 | 631 | |
| 7745 |
잘살아보자
|
10년 전 | 875 | |
| 7744 |
잘살아보자
|
10년 전 | 387 | |
| 7743 | 10년 전 | 912 | ||
| 7742 |
starbros
|
10년 전 | 785 | |
| 7741 |
잘살아보자
|
10년 전 | 603 | |
| 7740 |
잘살아보자
|
10년 전 | 478 | |
| 7739 |
잘살아보자
|
10년 전 | 432 | |
| 7738 |
잘살아보자
|
10년 전 | 488 | |
| 7737 |
잘살아보자
|
10년 전 | 445 | |
| 7736 |
잘살아보자
|
10년 전 | 466 | |
| 7735 |
잘살아보자
|
10년 전 | 800 | |
| 7734 |
잘살아보자
|
10년 전 | 392 | |
| 7733 |
잘살아보자
|
10년 전 | 491 | |
| 7732 |
잘살아보자
|
10년 전 | 649 | |
| 7731 |
잘살아보자
|
10년 전 | 577 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기