When i try to access this page: it shows this:

Warning: mysql_query(): 2 is not a valid MySQL-Link resource in /user/langlab/wwwhome/signup/signup_adm.html on line 28

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /user/langlab/wwwhome/signup/signup_adm.html on line 29

Warning: mysql_query(): 2 is not a valid MySQL-Link resource in /user/langlab/wwwhome/signup/signup_adm.html on line 36

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /user/langlab/wwwhome/signup/signup_adm.html on line 37

Warning: mysql_query(): 2 is not a valid MySQL-Link resource in /user/langlab/wwwhome/signup/signup_adm.html on line 44

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /user/langlab/wwwhome/signup/signup_adm.html on line 45


Warning: mysql_close(): 2 is not a valid MySQL-Link resource in /user/langlab/wwwhome/signup/signup_adm.html on line 580

I don't know whats going though but on the same db account i added a few more db file for a forum and this happens..i hope someone can help me.. A BIG THANKS!

<?
$DbConn = mysql_connect("localhost", "langlab", "djgkrdnjs");
mysql_select_db("langlab", $DbConn);

//--- 관리자인지 체크한다. ----------------------------
$Query = "SELECT count(kname) FROM s_master WHERE kname='$nm' AND juminno='$jm1-$jm2'";
$DbResult = mysql_query($Query);
$Cnts = mysql_result($DbResult,0,0);
if(!$Cnts){
    exit;
}
?>

<?
include "top_adm.html";
?>

<?
$msg = "수강신청 리스트가 표시 됩니다.";

if($tag==""){
    $msg = "";
    
    $Query  = "SELECT s_kwamok.haksuno,kwname,youil,s_kwamok.sigan,teacher,amount,inwonsu,kname,sgntime";
    $Query .= ",phone1,phone2,email,hakkwa,hakbun,hakyeon,reading,dungrok,s_haksang.juminno ";
    $Query .= "FROM s_kwamok,s_signup,s_haksang WHERE dungrok='on' AND s_kwamok.yearh='$ggyearh' AND s_signup.yearh='$ggyearh' AND s_haksang.yearh='$ggyearh' ";
    $Query .= "AND s_signup.juminno=s_haksang.juminno AND s_kwamok.haksuno=s_signup.haksuno AND gubn LIKE '%$gb%' ORDER BY sgntime DESC";
    $Result = mysql_query($Query, $DbConn);
    $TotalCnt = mysql_num_rows($Result);
    $msg1 = "등록건수 : " . $TotalCnt . "";

    $Query  = "SELECT s_kwamok.haksuno,kwname,youil,s_kwamok.sigan,teacher,amount,inwonsu,kname,sgntime";
    $Query .= ",phone1,phone2,email,hakkwa,hakbun,hakyeon,reading,dungrok,s_haksang.juminno ";
    $Query .= "FROM s_kwamok,s_signup,s_haksang WHERE reading='on' AND s_kwamok.yearh='$ggyearh' AND s_signup.yearh='$ggyearh' AND s_haksang.yearh='$ggyearh' ";
    $Query .= "AND s_signup.juminno=s_haksang.juminno AND s_kwamok.haksuno=s_signup.haksuno AND gubn LIKE '%$gb%' ORDER BY sgntime DESC";
    $Result = mysql_query($Query, $DbConn);
    $TotalCnt = mysql_num_rows($Result);
    $msg2 = "확인건수 : " . $TotalCnt . ", ";

    $Query  = "SELECT s_kwamok.haksuno,kwname,youil,s_kwamok.sigan,teacher,amount,inwonsu,kname,sgntime";
    $Query .= ",phone1,phone2,email,hakkwa,hakbun,hakyeon,reading,dungrok,s_haksang.juminno ";
    $Query .= "FROM s_kwamok,s_signup,s_haksang WHERE s_kwamok.yearh='$ggyearh' AND s_signup.yearh='$ggyearh' AND s_haksang.yearh='$ggyearh' ";
    $Query .= "AND s_signup.juminno=s_haksang.juminno AND s_kwamok.haksuno=s_signup.haksuno AND gubn LIKE '%$gb%' ORDER BY sgntime DESC";
    $Result = mysql_query($Query, $DbConn);
    $TotalCnt = mysql_num_rows($Result);
    
    $msg = "총건수 : " . $TotalCnt . ", " . $msg2 . $msg1;
    
    echo("<table border=0 width='95%' cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("    <tr>");
    echo("    <td><b>* 수강신청 과목 리스트</b> (<font color=navy>$msg</font>)</td>");
    echo("    </tr>");
    echo("</table>");    
    
    echo("<table border=1 width='95%' cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("<tr bgcolor=#eeeeee>");
    echo("<td>순번</td>");
    echo("<td>날자 시간</td>");
    echo("<td>이름</td>");
    echo("<td>학수<br>번호</td>");
    echo("<td>과목명</td>");
    echo("<td>요일</td>");
    echo("<td>시간</td>");
    echo("<td>집전화</td>");
    echo("<td>휴대폰</td>");
    //echo("<td>이메일</td>");
    //echo("<td>학생정보(학번,학과,학년)</td>");
    echo("<td>확인</td>");
    echo("<td>등록</td>");
    echo("</tr>");
    
    if($TotalCnt >= 1){
        $sno = 1;
        while($Row = mysql_fetch_array($Result)){
            echo("<tr>");
            echo("<td align=center>" . $sno++ . "</td>");
            //echo("<td>" . substr($Row["sgntime"],0,10) . "</td>");
            echo("<td>" . $Row["sgntime"] . "</td>");
            echo("<td><a href=signup_adm.html?gb=$gb&tag=detail&ssyearh=$ggyearh&srnum=" . substr($Row["juminno"],7,7) . $Row["haksuno"] . substr($Row["juminno"],0,6) . ">" . $Row["kname"] . "</a></td>");
            echo("<td>" . $Row["haksuno"] . "</td>");
            echo("<td>" . $Row["kwname"] . "</td>");
            echo("<td>" . $Row["youil"] . "&nbsp;</td>");
            echo("<td>" . $Row["sigan"] . "</td>");
            //echo("<td>" . $Row["roomno"] . "&nbsp;</td>");
            echo("<td>" . $Row["phone1"] . "</td>");
            echo("<td>" . $Row["phone2"] . "</td>");
            //echo("<td>" . $Row["email"] . "</td>");
            //echo("<td>" . $Row["hakbun"] . "," . $Row["hakkwa"] . "," .$Row["hakyeon"] . "</td>");
            if($Row["reading"]=="on") echo("<td><font color=blue>확인</font></td>");
            else              echo("<td>미확인</td>");
            if($Row["dungrok"]=="on") echo("<td><font color=red>등록</font></td>");
            else              echo("<td>미등록</td>");
            echo("</tr>");
        }
    }else{
        echo("<tr>");
        echo("<td colspan=12 height=25 align=center>현재 신청된 자료가 없습니다.</td>");
        echo("</tr>");
    }    
    echo("</table>");
}

if($tag=="detail"){
    $Query = "SELECT juminno,kname,ename,hakkwa,hakyeon,hakbun,phone1,phone2,htime,email FROM s_haksang WHERE yearh='$ggyearh' AND juminno='" . substr($srnum,11,6). "-" . substr($srnum,0,7) . "'";
    $Result = mysql_query($Query, $DbConn);
    $Row = mysql_fetch_array($Result);
?>
    <table border=0 width='100%' cellpadding="1" cellspacing="0" bordercolor="silver" bordercolordark="white" bordercolorlight="gray">
        <tr>
        <td><b>* 신청자 기본정보</b></td>
        </tr>
    </table>    
    <table border=1 width='600' cellpadding="1" cellspacing="0" bordercolor="silver" bordercolordark="white" bordercolorlight="gray">
        <tr>
        <td align=right bgcolor=#eeeeee width='20%'>이름(한글)&nbsp;</td>
        <td width='30%'>&nbsp;<?=$Row["kname"]?> (<?=$Row["juminno"]?>)</td>
        <td align=right bgcolor=#eeeeee width='20%'>이름(영문)&nbsp;</td>
        <td width='30%'>&nbsp;<?=$Row["ename"]?>&nbsp;</td>
        </tr>
    
        <tr>
        <td align=right bgcolor=#eeeeee>학과&nbsp;</td>
        <td>&nbsp;<?=$Row["hakkwa"]?>&nbsp;</td>
        <td align=right bgcolor=#eeeeee>학번&nbsp;</td>
        <td>&nbsp;<?=$Row["hakbun"]?>&nbsp;</td>
        </tr>
        
        <tr>    
        <td align=right bgcolor=#eeeeee>학년&nbsp;</td>
        <td>&nbsp;<?=$Row["hakyeon"]?>&nbsp;</td>
        <td align=right bgcolor=#eeeeee>연락처(집)&nbsp;</td>
        <td>&nbsp;<?=$Row["phone1"]?>&nbsp;</td>
        </tr>
        
        <tr>
        <td align=right bgcolor=#eeeeee>연락처(휴대폰)&nbsp;</td>
        <td>&nbsp;<?=$Row["phone2"]?>&nbsp;</td>
        <td align=right bgcolor=#eeeeee>이메일&nbsp;</td>
        <td>&nbsp;<?=$Row["email"]?>&nbsp;</td>
        </tr>

        <tr>
        <td align=right bgcolor=#eeeeee>희망 시간&nbsp;</td>
        <td colspan=3>&nbsp;<?=$Row["htime"]?>&nbsp;</td>
        </tr>
    </table>

    <br>

<?
    $Query = "SELECT s_kwamok.haksuno,kwname,youil,s_kwamok.sigan,teacher,amount,inwonsu,reading,dungrok,roomno,sgntime FROM s_kwamok,s_signup WHERE s_kwamok.yearh='$ggyearh' AND s_kwamok.haksuno=s_signup.haksuno AND s_signup.haksuno='" . substr($srnum,7,4). "' AND juminno='" . substr($srnum,11,6). "-" . substr($srnum,0,7) . "'";
    $Result = mysql_query($Query, $DbConn);
    $TotalCnt = mysql_num_rows($Result);

    echo("<table border=0 width='95%' cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("    <tr>");
    echo("    <td><b>* 수강신청 과목 리스트</b> (<font color=red>$msg</font>)</td>");
    echo("    </tr>");
    echo("</table>");    

    echo("<table border=1 width='95%' cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("<tr bgcolor=#eeeeee>");
    echo("<td>학수<br>번호</td>");
    echo("<td>과목명</td>");
    echo("<td>요일</td>");
    echo("<td>시간</td>");
    echo("<td>강의실</td>");
    echo("<td>교수명</td>");
    echo("<td>수강료</td>");
    echo("<td>인원<br>제한</td>");
    echo("<td>등록<br>시간</td>");
    echo("</tr>");
    if($TotalCnt >= 1){
        while($Row = mysql_fetch_array($Result)){
            echo("<tr>");
            echo("<td>" . $Row["haksuno"] . "</td>");
            echo("<td>" . $Row["kwname"] . "</td>");
            echo("<td>" . $Row["youil"] . "&nbsp;</td>");
            echo("<td>" . $Row["sigan"] . "</td>");
            echo("<td>" . $Row["roomno"] . "&nbsp;</td>");
            echo("<td>" . $Row["teacher"] . "&nbsp;</td>");
            echo("<td>" . number_format($Row["amount"]) . "</td>");
            echo("<td>" . $Row["inwonsu"] . "</td>");
            echo("<td>" . $Row["sgntime"] . "</td>");
            echo("</tr>");
            $temp_r = $Row["reading"];
            $temp_d = $Row["dungrok"];
        }
    }else{
        echo("<tr>");
        echo("<td colspan=7 height=25 align=center>현재 신청된 과목이 없습니다.</td>");
        echo("</tr>");
    }    
    echo("</table>");
    
    echo("<form name=chk method=post action=signup_adm.html>");
    echo("<input type=hidden name=tag value=chkupd>");
    echo("<input type=hidden name=ssyearh value=$ggyearh>");
    echo("<input type=hidden name=gb value=$gb>");
    echo("<input type=hidden name=srnum value=$srnum>");

    echo("<table border=1 cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("    <tr>");
    echo("    <td>");
    if($temp_r=="on"){
        echo("확인 : <input type=checkbox name=reading checked value="ON">&nbsp;&nbsp;");
    }else{    
        echo("확인 : <input type=checkbox name=reading value="ON">&nbsp;&nbsp;");
    }
    echo("    </td>");
    echo("    <td>");
    if($temp_d=="on"){
        echo("등록 : <input type=checkbox name=dungrok checked value="ON">");
    }else{    
        echo("등록 : <input type=checkbox name=dungrok value="ON">");
    }
    echo("    </td>");
    echo("    <td>");
    echo("삭제 : <input type=checkbox name=sakjae value="ON">");
    echo("    </td>");
    echo("    </tr>");
    echo("</table>");    
    echo("<br><br>
  <input type=image src=images/sin_info_save.gif border=0 width="179" height="21">");
    echo("</form>");
}

if($tag=="chkupd"){
    $Query = "UPDATE s_signup SET reading='$reading',dungrok='$dungrok' WHERE yearh='$ggyearh' AND haksuno='" . substr($srnum,7,4) . "' AND juminno='" . substr($srnum,11,6). "-" . substr($srnum,0,7) . "'";
    $Result = mysql_query($Query, $DbConn);
    
    if($sakjae=="on"){
        $Query = "DELETE FROM s_signup WHERE yearh='$ggyearh' AND haksuno='" . substr($srnum,7,4) . "' AND juminno='" . substr($srnum,11,6). "-" . substr($srnum,0,7) . "'";
        $Result = mysql_query($Query, $DbConn);
    }

    echo("<form name=chk method=post action=signup_adm.html>");
    echo("<input type=hidden name=tag value=''>");
    echo("<input type=hidden name=ssyearh value=$ggyearh>");
    echo("<input type=hidden name=gb value=$gb>");
    echo("</form>");
    echo("<script language=javascript> document.chk.submit(); </script>");
}

if($tag=="2"){
    if($tag2=="copy"){
        //$Query = "UPDATE s_ggyear SET ggcode='0' WHERE yearh='$ggyearh'";
        $Query = "UPDATE s_ggyear SET ggcode='0'";
        $Result = mysql_query($Query, $DbConn);

        $Query = "INSERT INTO s_ggyear VALUES ('$nyear-$nhaki','1')";
        $Result = mysql_query($Query, $DbConn);

        //$Query = "SELECT * FROM s_kwamok WHERE yearh='$ggyearh'";
        //$Result = mysql_query($Query, $DbConn);
        //while($Row = mysql_fetch_array($Result)){
        //    $Query1 = "INSERT INTO s_kwamok VALUES ('$nyear-$nhaki','$Row[1]','$Row[2]','$Row[3]','$Row[4]','$Row[5]','$Row[6]','$Row[7]','$Row[8]','$Row[9]')";
        //    $Result1 = mysql_query($Query1, $DbConn);
        //}        
    }
    $Query = "SELECT yearh,ggcode FROM s_ggyear order by ggcode desc, yearh desc";
    $Result = mysql_query($Query, $DbConn);

    echo("<form name=chyr method=post action=signup_adm.html>
</form>
");
    echo("<input type=hidden name=tag  value='2'>");
    echo("<input type=hidden name=tag2  value='copy'>");
    echo("<table border=1 cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("    <tr>");
    echo("  <td>");
    echo("    <select name=nyear>    ");
    echo("    <option value=2005>2005</option>    ");
    echo("    <option value=2006>2006</option>    ");
    echo("    <option value=2007>2007</option>    ");
    echo("    <option value=2007>2008</option>    ");
    echo("    <option value=2007>2009</option>    ");
    echo("    <option value=2007>2010</option>    ");
    echo("    </select>");
    echo("    <select name=nhaki>    ");
    echo("    <option value=춘계>춘계</option>    ");
    echo("    <option value=4월>4월</option>    ");
    echo("    <option value=5월>5월</option>    ");
    echo("    <option value=6월>6월</option>    ");
    echo("    <option value=하계>하계</option>    ");
    echo("    <option value=추계>추계</option>    ");
    echo("    <option value=10월>10월</option>    ");
    echo("    <option value=동계>동계</option>    ");
    echo("    </select>");
    echo("  <td>");
    echo("  </tr>");
    echo("    <tr>");
    echo("  <td colspan=2><input type=submit name=submit value='새학기 개설'></td>");
    echo("  </tr>");
    echo("</form>");
    echo("</table>");

    echo("<form name=chyr method=post action=signup_adm.html>
</form>
");
    echo("<input type=hidden name=tag  value='2'>");
    echo("<table border=1 cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    while($Row = mysql_fetch_array($Result)){
        echo("    <tr>");
        echo("<td><input type=text size=10 name=yearh value=" . $Row["yearh"] . " readonly></td>");
        echo("<td>");
        if($Row["ggcode"]=="1"){
            echo("<input type=radio name=yearrdo checked>");
        }else{
            echo("<input type=radio name=yearrdo>");
        }    
        echo("    </td>");
        echo("</tr>");
    }
    echo("</form>");
    echo("</table>");
}

if($tag=="3"){
    $Query = "SELECT gubn,startday,endday FROM s_seday";
    $Result = mysql_query($Query, $DbConn);

    echo("<form name=chyr method=post action=signup_adm.html>");
    echo("<input type=hidden name=tag value=dayupd>");
    echo("<table border=1 cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("<tr bgcolor=#eeeeee>");
    echo("<td>구분</td>");
    echo("<td>시작일</td>");
    echo("<td>종료일</td>");
    echo("</tr>");
    $while_cnt = 0;
    while($Row = mysql_fetch_array($Result)){
        echo("<tr>");
        echo("<td><input type=hidden name=g[" . $while_cnt . "] value='" . $Row["gubn"] . "'>" . $Row["gubn"] . "</td>");
        echo("<td>
      <input type=text name=s[" . $while_cnt . "] value='" . $Row["startday"] . "'></td>");
        echo("<td size="20"><input type=text name=e[" . $while_cnt . "] value='" . $Row["endday"] . "'></td>");
        echo("</tr size="20">");
        $while_cnt = $while_cnt + 1;
    }
    echo("</table>");
    echo("<br><br>
  <input type=image src=images/sin_info_save.gif border=0 width="179" height="21">");
    echo("</form>");
}

if($tag=="dayupd"){
    $while_cnt = 0;
    while($g[$while_cnt]!=""){
        $Query = "UPDATE s_seday SET startday='$s[$while_cnt]',endday='$e[$while_cnt]' WHERE gubn='$g[$while_cnt]'";
        $Result = mysql_query($Query, $DbConn);
        $while_cnt++;
    }
    
    echo("<form name=chk method=post action=signup_adm.html>");
    echo("<input type=hidden name=tag value='3'>");
    echo("</form>");
    echo("<script language=javascript> document.chk.submit(); </script>");
}

if($tag=="6"){
    if($del=="1"){
        $Query = "DELETE FROM s_master WHERE juminno='$jm'";
        $Result = mysql_query($Query, $DbConn);
    }
    if($ins=="1"){
        $Query = "INSERT INTO s_master VALUES ('$m_name','$jm')";
        $Result = mysql_query($Query, $DbConn);
    }
    
    $Query = "SELECT kname,juminno FROM s_master ORDER BY juminno";
    $Result = mysql_query($Query, $DbConn);

    echo("<form name=chyr method=post action=signup_adm.html>");
    echo("<input type=hidden name=tag value=6>");
    echo("<input type=hidden name=ins value=1>");
    echo("<table width=300 border=1 cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("<tr bgcolor=#eeeeee>");
    echo("<td>이름</td>");
    echo("<td>주민번호</td>");
    echo("<td> </td>");
    echo("</tr>");
    echo("<tr>");
    echo("<td><input type=text name=m_name size=6 maxlength=5 value=''></td>");
    echo("<td><input type=text name=jm size=15 maxlength=14 value=''> ( - 포함)</td>");
    echo("<td><input type=submit value='입력'></td>");
    echo("</tr>");
    echo("</table>");
    echo("</form>");

    echo("<table width=300 border=1 cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("<tr bgcolor=#eeeeee>");
    echo("<td>이름</td>");
    echo("<td>주민번호</td>");
    echo("<td> </td>");
    echo("</tr>");
    $while_cnt = 0;
    while($Row = mysql_fetch_array($Result)){
        if($Row["kname"]=="관리자"){
            //
        }else{
            echo("<tr>");
            echo("<td>". $Row["kname"] . "</td>");
            echo("<td>". $Row["juminno"] . "</td>");
            echo("<td><a href=signup_adm.html?tag=6&del=1&jm=". $Row["juminno"] . ">[삭제]</a></td>");
            echo("</tr>");
            $while_cnt = $while_cnt + 1;
        }
    }
    echo("</table>");
}

if($tag=="4"){
    if($tag2=="del"){
        $Query = "DELETE FROM s_kwamok WHERE yearh='$yearh' and haksuno='$haksuno'";
        $Result = mysql_query($Query, $DbConn);
    }
    if($tag2=="upd"){
        //$Query = "UPDATE s_kwamok SET yearh='$yearh',haksuno='$haksuno',gubn='$gubn',kwname='$kwname',youil='$youil',sigan='$sigan',roomno='$roomno',teacher='$teacher',amount='$amount',inwonsu='$inwonsu' WHERE yearh='$yearh' and haksuno='$o_haksuno'";
        $Query = "UPDATE s_kwamok SET gubn='$gubn',kwname='$kwname',youil='$youil',sigan='$sigan',roomno='$roomno',teacher='$teacher',amount='$amount',inwonsu='$inwonsu',info='$info' WHERE yearh='$yearh' and haksuno='$o_haksuno'";
        $Result = mysql_query($Query, $DbConn);
        //echo $Query;
    }
    if($tag2=="ins"){
        $Query = "INSERT INTO s_kwamok VALUES ('$yearh','$o_haksuno','$gubn','$kwname','$youil','$sigan','$roomno','$teacher','$amount','$inwonsu','$info')";
        $Result = mysql_query($Query, $DbConn);
    }

    $msg = "개설 과목 리스트 입니다.";
    
    $Query = "SELECT yearh,haksuno,gubn,kwname,youil,sigan,roomno,teacher,amount,inwonsu,info FROM s_kwamok WHERE yearh='$ggyearh'";
    $Result = mysql_query($Query, $DbConn);
    $TotalCnt = mysql_num_rows($Result);

    echo("<table border=0 width='95%' cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("    <tr>");
    echo("    <td><b>* 수강 개설 과목 리스트</b> (<font color=red>$msg</font>)</td>");
    echo("    </tr>");
    echo("</table>");    

    echo("<table border=1 width='95%' cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("<tr bgcolor=#eeeeee>");
    echo("<td>년도<br>학기</td>");
    echo("<td>학수<br>번호</td>");
    echo("<td>구분</td>");
    echo("<td>과목명</td>");
    echo("<td>요일</td>");
    echo("<td>시간</td>");
    echo("<td>강의실</td>");
    echo("<td>교수명</td>");
    echo("<td>수강료</td>");
    echo("<td>인원<br>제한</td>");
    echo("<td>교수소개</td>");
    echo("<td>비고</td>");
    echo("</tr>");
    if($TotalCnt >= 1){
        while($Row = mysql_fetch_array($Result)){
            echo("<tr>");
            echo("<form name=upd action=signup_adm.html>");
            echo("<input type=hidden name=tag  value='4'>");
            echo("<input type=hidden name=tag2 value='upd'>");
            //echo("<td><input size=8 type=text name=yearh value='" . $Row["yearh"] . "'></td>");
            echo("<td><input type=hidden name=yearh value='" . $Row["yearh"] . "'>" . $Row["yearh"] . "</td>");
            //echo("<td><input size=4 type=hidden name=o_haksuno value='" . $Row["haksuno"] . "'><input size=4 type=text name=haksuno value='" . $Row["haksuno"] . "'></td>");
            echo("<td><input size=4 type=hidden name=o_haksuno value='" . $Row["haksuno"] . "'>" . $Row["haksuno"] . "</td>");
            echo("<td><input size=7 type=text name=gubn value='" . $Row["gubn"] . "'></td>");
            echo("<td><input size=28 type=text name=kwname value='" . $Row["kwname"] . "'></td>");
            echo("<td><input size=7 type=text name=youil value='" . $Row["youil"] . "'></td>");
            echo("<td><input size=10 type=text name=sigan value='" . $Row["sigan"] . "'></td>");
            echo("<td><input size=9 type=text name=roomno value='" . $Row["roomno"] . "'></td>");
            echo("<td><input size=10 type=text name=teacher value='" . $Row["teacher"] . "'></td>");
            //echo("<td><input size=7 type=text name=amount value='" . number_format($Row["amount"]) . "'></td>");
            echo("<td><input size=6 type=text name=amount value='" . $Row["amount"] . "'></td>");
            echo("<td><input size=3 type=text name=inwonsu value='" . $Row["inwonsu"] . "'></td>");
            echo("<td><input size=10 type=text name=info value='" . $Row["info"] . "'></td>");
            echo("<td><input type=submit value='수정'><a href=signup_adm.html?tag=4&yearh=" . $Row["yearh"] . "&haksuno=" . $Row["haksuno"] . "&tag2=del>[삭제]</a></td>");
            echo("</form>");
            echo("</tr>");
            $temp_r = $Row["reading"];
            $temp_d = $Row["dungrok"];
        }
        echo("<tr>");
        echo("<form name=upd action=signup_adm.html>");
        echo("<input type=hidden name=tag  value='4'>");
        echo("<input type=hidden name=tag2 value='ins'>");
        echo("<td><input type=hidden name=yearh value='" . $ggyearh . "'>" . $ggyearh . "</td>");
        echo("<td><input size=4 type=text name=o_haksuno value='" . $Row["haksuno"] . "'></td>");
        echo("<td><input size=7 type=text name=gubn value='" . $Row["gubn"] . "'></td>");
        echo("<td><input size=28 type=text name=kwname value='" . $Row["kwname"] . "'></td>");
        echo("<td><input size=7 type=text name=youil value='" . $Row["youil"] . "'></td>");
        echo("<td><input size=10 type=text name=sigan value='" . $Row["sigan"] . "'></td>");
        echo("<td><input size=9 type=text name=roomno value='" . $Row["roomno"] . "'></td>");
        echo("<td><input size=10 type=text name=teacher value='" . $Row["teacher"] . "'></td>");
        echo("<td><input size=6 type=text name=amount value='" . $Row["amount"] . "'></td>");
        echo("<td><input size=3 type=text name=inwonsu value='" . $Row["inwonsu"] . "'></td>");
        echo("<td><input size=10 type=text name=info value='" . $Row["info"] . "'></td>");
        echo("<td><input type=submit value='입력'></td>");
        echo("</form>");
        echo("</tr>");
    }else{
        echo("<tr>");
        echo("<form name=upd action=signup_adm.html>");
        echo("<input type=hidden name=tag  value='4'>");
        echo("<input type=hidden name=tag2 value='ins'>");
        echo("<td><input type=hidden name=yearh value='" . $ggyearh . "'>" . $ggyearh . "</td>");
        echo("<td><input size=4 type=text name=o_haksuno value='" . $Row["haksuno"] . "'></td>");
        echo("<td><input size=7 type=text name=gubn value='" . $Row["gubn"] . "'></td>");
        echo("<td><input size=28 type=text name=kwname value='" . $Row["kwname"] . "'></td>");
        echo("<td><input size=7 type=text name=youil value='" . $Row["youil"] . "'></td>");
        echo("<td><input size=10 type=text name=sigan value='" . $Row["sigan"] . "'></td>");
        echo("<td><input size=9 type=text name=roomno value='" . $Row["roomno"] . "'></td>");
        echo("<td><input size=10 type=text name=teacher value='" . $Row["teacher"] . "'></td>");
        echo("<td><input size=6 type=text name=amount value='" . $Row["amount"] . "'></td>");
        echo("<td><input size=3 type=text name=inwonsu value='" . $Row["inwonsu"] . "'></td>");
        echo("<td><input type=submit value='입력'></td>");
        echo("</form>");
        echo("</tr>");

        echo("<tr>");
        echo("<td colspan=11 height=25 align=center>현재 개설된 과목이 없습니다.</td>");
        echo("</tr>");
    }    
    echo("</table>");
}

if($tag=="5"){
    if($tag2=="del"){
        $Query = "DELETE FROM s_haksang WHERE yearh='$yearh' and juminno='$juminno'";
        $Result = mysql_query($Query, $DbConn);
    }

    $msg = "저장된 학생 정보 리스트 입니다.";
    
    $Query = "SELECT yearh,juminno,kname,ename,hakkwa,hakyeon,hakbun,phone1,phone2,htime,email FROM s_haksang WHERE yearh='$ggyearh'";
    $Result = mysql_query($Query, $DbConn);
    $TotalCnt = mysql_num_rows($Result);

    echo("<table border=0 width='95%' cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("    <tr>");
    echo("    <td><b>* 학생 정보 리스트</b> (<font color=red>$msg</font>)</td>");
    echo("    </tr>");
    echo("</table>");    

    echo("<table border=1 width='95%' cellpadding='1' cellspacing='0' bordercolor='silver' bordercolordark='white' bordercolorlight='gray'>");
    echo("<tr bgcolor=#eeeeee>");
    echo("<td>순번</td>");
    echo("<td>년도<br>학기</td>");
    echo("<td>주민번호</td>");
    echo("<td>한글이름</td>");
    echo("<td>영문이름</td>");
    //echo("<td>학과</td>");
    echo("<td>학번</td>");
    echo("<td>집전화</td>");
    echo("<td>휴대폰</td>");
    //echo("<td>희망 공강시간</td>");
    echo("<td>이메일</td>");
    echo("<td>비고</td>");
    echo("</tr>");
    if($TotalCnt >= 1){
        $while_cnt = 1;
        while($Row = mysql_fetch_array($Result)){
            echo("<tr>");
            echo("<td>" . $while_cnt++ . "</td>");
            echo("<td>" . $Row["yearh"] . "</td>");
            echo("<td>" . $Row["juminno"] . "</td>");
            echo("<td>" . $Row["kname"] . "</td>");
            echo("<td>" . $Row["ename"] . "</td>");
            //echo("<td>" . $Row["hakkwa"] . "&nbsp;</td>");
            echo("<td>" . $Row["hakbun"] . "</td>");
            echo("<td>" . $Row["phone1"] . "&nbsp;</td>");
            echo("<td>" . $Row["phone2"] . "&nbsp;</td>");
            //echo("<td>" . $Row["htime"] . "&nbsp;</td>");
            echo("<td>" . $Row["email"] . "</td>");
            echo("<td><a href=signup_adm.html?tag=5&yearh=" . $Row["yearh"] . "&juminno=" . $Row["juminno"] . "&tag2=del>[삭제]</a></td>");
            echo("</tr>");
            $temp_r = $Row["reading"];
            $temp_d = $Row["dungrok"];
        }
    }else{
        echo("<tr>");
        echo("<td colspan=97 height=25 align=center>현재 학기에 저장된 학생 정보가 없습니다.</td>");
        echo("</tr>");
    }    
    echo("</table>");
}

mysql_close($DbConn);
?></body></html>

Couple of things that may help you out.

First I noticed that you are using PHP code, yet the page is a .html page. In order for PHP to be processed your page needs to be .php not .html

Second in your myqsl_query command you have ($Query, $DBCon) which is unnessesary. Just have your query: $Result = mysql_query($Query)

As well, when coding you should add the following to your querys, this will instead of showing a generic MySQL error, give you a more exact error as to what happened, and will stop processing the code if one of the queries do not work:
$Result = mysql_query($Query) or die (mysql_error());

If your still having troubles, post the new error you get with that new query code.

if i replace the original $result code with your format, it shows this error:

Parse error: syntax error, unexpected T_VARIABLE in /user/langlab/wwwhome/signup/signup_adm.html on line 8


which is

$Cnts = mysql_result($DbResult,0,0);

So I add or die (mysql_error()); to my original $result code and this it what it shows:

Parse error: syntax error, unexpected T_STRING in /user/langlab/wwwhome/signup/signup_adm.html on line 206

WHICH IS:

echo("확인 : <input type=checkbox name=reading checked value="ON">&nbsp;&nbsp;");


how can this line gives problem?

Thanks!

Couple of things that may help you out.

First I noticed that you are using PHP code, yet the page is a .html page. In order for PHP to be processed your page needs to be .php not .html

Second in your myqsl_query command you have ($Query, $DBCon) which is unnessesary. Just have your query: $Result = mysql_query($Query)

As well, when coding you should add the following to your querys, this will instead of showing a generic MySQL error, give you a more exact error as to what happened, and will stop processing the code if one of the queries do not work:
$Result = mysql_query($Query) or die (mysql_error());

If your still having troubles, post the new error you get with that new query code.

echo("확인 : <input type=checkbox name=reading checked value="ON">&nbsp;&nbsp;");

should be:

echo("확인 : <input type=checkbox name=reading checked value=\"ON\">&nbsp;&nbsp;");

you should escape the double quotes

good luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.