묻고답하기

첫번째 admin2.php 입니다....





<?
session_start();
include "../include/config.php";
include "../include/util.php";
$connect=my_connect($hostName,$userName,$userPassword,$dbName);
$limit=100;
if (!$passover) {
 $passover=0;
}
$result=mysql_query("select * from member_table order by gunbun desc limit $passover,$limit",$connect);


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
 <head>
  <meta http-equiv="Content-Type" content="text/htm/; charset=eun-kr" />
  <title></title>
  <link type="text/css" rel="stylesheet" href="/../css/index.css" media="screen" />
  <link type="text/css" rel="stylesheet" href="/../css/administrator.css" media="screen" />
<script language="Javascript">
function edit(){
 var x= 0;
 var obj = document.getElementsByName("gunbuns[]");
 for (var i=0; i < obj.length; i++) {
  if(obj[i].checked == true) {
  x++;
  }
 }
 if(x == 0){
  window.alert("선택된 항목이 없습니다.");
  return false;
 }

 if(confirm('입력하신 부분을 수정하시겠습니까?')){
 document.write.action="admin2_ok.php";
 document.write.method="post";
 document.write.submit();
 }else{
 }
 }

</script>
 </head>
 <body>
  <div>
  <?php include('/../head.php');?>
  <div id="main">
    <?php include('/../lefter.php');?>
    <div id="content">
    <?php include('submenu07.php');?>
    <div id="admin">
      <table class="1month">
      <tr>
        <td>
        <div class="back">
          <p>1개월 이내 퇴거 예상자</p>
        </div>
        </td>
      </tr>
      <tr>
        <td>
        <span style="MARGIN-LEFT: 3px;">
          <table class="movein" align="center">
          <tr>
            <th>
            동수
            </th>
            <th>
            호수
            </th>
            <th>
            소속
            </th>
            <th>
            나이
            </th>
            <th>
            직책
            </th>
            <th>
            주민
            </th>
            <th>
            성명
            </th>
            <th>
            거주인원
            </th>
            <th>
            입주일
            </th>
            <th>
            퇴거 예상일
            </th>
          </tr>
          <tr>
            <td>
            101
            </td>
            <td>
            101
            </td>
            <td>
            dddd
            </td>
            <td>
            dd
            </td>
            <td>
            dddd
            </td>
            <td>
            sssss
            </td>
            <td>
            ddd
            </td>
            <td>
            1
            </td>
            <td>
            07.7.21
            </td>
            <td>
            08.4.12
            </td>
          </tr>
          </table>
        </span>
        </td>
      </tr>
      </table>
      <br>
      <form method="post" name="write">
      <table class="border">
      <tr>
        <td>
        <div class="back">
          <p style="padding-left:10px;">대기자순번/입주입력</p>
        </div>
        </td>
      </tr>
      <tr>
        <td>
        <span style="MARGIN-LEFT: 3px;">
          <table class="movein" align="center">
          <tr>
            <th class="admin">
            선택
            </th>
            <th>
            소속
            </th>
            <th>
            나이
            </th>
            <th>
            직책
            </th>
            <th>
            주민
            </th>
            <th>
            성명
            </th>
            <th>
            거주<br>인원
            </th>
            <th>
            입주요청일
            </th>
            <th class="admin">
            대기<br>순번
            </th>
            <th class="admin">
            입주예상일<br>
            (년,월,일)
            </th>
            <th class="admin">
            동수
            </th>
            <th class="admin">
            호수
            </th>
          </tr>
<?
$i=0;
while($row=mysql_fetch_array($result))
{

          echo "<tr>";
          echo "<td>";
          echo  "<input type='checkbox' name='+ '+ 'gunbuns[]' value='$i'>";
          echo  "<input type='hidden' name='rowgunbuns[]' value='$row[gunbun]'>";
          echo "</td>";
          echo "<td>";
          echo  "$row[force_b1]<br>";
          echo  $row[force_b2];
          echo "</td>";
          echo "<td>";
          echo  $row[grade];
          echo "</td>";
          echo "<td>";
          echo  $row[job];
          echo "</td>";
          echo "<td>";
          echo  $row[gunbun];
          echo "</td>";
          echo "<td>";
          echo  $row[name];
          echo "</td>";
          echo "<td>";
          echo  $row[persons];
          echo "</td>";
          echo "<td>";
          echo  "$row[years]. $row[month]. $row[days]";
          echo "</td>";
          echo "<td>";
          echo  "<input type='text' name='sequents[]' value='$row[sequent]' size='1' maxlength='2'>";
          echo "</td>";
          echo "<td>";
          echo  "<input type='text' name='ayears[]' value='$row[ayear]' size='1' maxlength='2'>";
          echo  "<input type='text' name='amonths[]' value='$row[amonth]' size='1' maxlength='2'>";
          echo  "<input type='text' name='adays[]' value='$row[aday]' size='1' maxlength='2'>";
          echo "</td>";
          echo "<td>";
          echo  "<input type='text' name='dongs[]' value='$row[dong]' size='2' maxlength='3'>";
          echo "</td>";
          echo "<td>";
          echo  "<input type='text' name='hos[]' value='$row[ho]' size='2' maxlength='3'>";
          echo "</td>";
          echo"</tr>";
$i++;
}
          ?>
          </table>
          <table width="670px">
          <tr>
            <td align="right">
            <input type="button" value="입력">
            </td>
          </tr>
          </table>
          </form>
        </span>
        </td>
      </tr>
      </table>
    </div>
    </div>
  </div>
  <?php include('+ '/../copyright.php');?>
  </div>
 </body>
</html>







2번쨰 admin2_ok.php 입니다.







<?
session_start();
include "../include/config.php";
include "../include/util.php";
$connect=my_connect($hostName,$userName,$userPassword,$dbName);


$query="SELECT gunbun FROM member_table";
$result=mysql_query($query, $connect);
$No=$_POST["No"];
$gunbun=$_POST["gunbun"];
$name=$_POST["name"];
$married=$_POST["married"];
$sex=$_POST["sex"];
$grade=$_POST["grade"];
$force_b1=$_POST["force_b1"];
$force_b2=$_POST["force_b2"];
$job=$_POST["job"];
$persons=$_POST["persons"];
$phone=$_POST["phone"];
$remark=$_POST["remark"];
$years=$_POST["years"];
$month=$_POST["month"];
$days=$_POST["days"];
$sequent=$_POST["sequent"];
$ayear=$_POST["ayear"];
$amonth=$_POST["amonth"];
$aday=$_POST["aday"];
$dong=$_POST["dong"];
$ho=$_POST["ho"];


for($i=0;$i<count($gunbuns);$i++){
 $new_num = $gunbuns[$i];
$query="UPDATE member_table SET sequent='$sequents[$new_num]',ayear='$ayears[$new_num]',amonth='$amonths[$new_num]',aday='$adays[$new_num]',dong='$dongs[$new_num]',ho='$hos[$new_num]' WHERE gunbun='$row_num[$new_num]'";
$result=mysql_query($query, $connect);
}
if(!$result) {
 err_msg('데이터베이스오류가 발생?');
}
else {
 echo("<script>
  window.alert('입력이 되었습니다.');
  </script>");
 echo "<meta http-equiv='Refresh' content='0; URL=/07administrator/admin2.php'>";
}

?>









잘못된게 있나요..??? ㅠㅠ 수정이 안되네요 값들이...아오......



제발 부탁드려요 ㅠㅠ 어디가 잘못된건지...아니면 잘 못 한건지 지적이랑 도움의 글 부탁드립니다...
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
sakurastorm 첨부파일명이 길어서 첨부가 안되는 문제 [1] file 2009.05.11 by 비나무
철새a db가 자꾸 깨지네요 ㅠ [2] 2009.05.11 by 비나무
박효신1 외부아이피변경질문 [1] 2009.05.11 by 비나무
bluesunwon 회원가입질문  
연수 홈페이지 링크관련 [1] 2009.05.11 by 비나무
김형진641 BlogApi 관련 Windows Live Writer 등록할 때 오류나서요. [1] 2009.05.11 by 비나무
철이베베 페이지 수정 [1] 2009.05.11 by 비나무
부우우 캐시 재생성 시 외부 페이지가 백지로 뜨는 현상 [3] 2009.05.11 by 슈퍼지
LunarDream 관리자 모드에서 레이아웃 생성이 안될 때 [1] file 2009.05.11 by 비나무
부푸러 플래닛에 사진 업로드 기능은 추가 않하실 예정인가요? [2] 2009.05.11 by 부푸러
김창우740 레프트 메뉴 어떻게 만드나요? [2] 2009.05.11 by 김창우740
hias 쪽지관리에서 날짜(보낸날짜,받은날짜) 폰트색상 수정 방법....알려주세요ㅜㅜ  
남국 nobody 로 소유자가 바뀌고 [3] 2009.05.11 by 라르게덴
개돌 접속 통계 문의 드립니다. [1] 2009.05.11 by 개돌
은영 이미지, 게시글 관련 질문입니다.  
blue7day 1.2.2 로 최초설치후 기본페이지를 바꿀수가 없네요 [2] 2009.05.11 by blue7day
신휘 초기 화면 고정 문제 [1] 2009.05.11 by blue7day
이윤상309 xp pro 에서 설치가 잘 안되네요.ㅠㅠㅠ  
sky77 제발 도와주세요 file  
김희영 게시판이 안뜨는데 내용이라도 살릴 수 있을까요?  
김창우740 레프트에 메뉴는 어떻게 만드나요? [3] 2009.05.11 by 김창우740
하태호 첫페이지에서 언어선택 문제..  
pidkr 회원이름으로 회원정보검색 기능 가능한가요???  
온다뤼 regdate 읽어오기  
하이우리 업그레이드 했는데 모든게시판 리스트가 중앙으로 정렬 되네요. ㅠㅠ file  
허동현임돠 구글애드센스 호환되나요?  
Badboy 페이지에서 스크립트.. [3] 2009.05.11 by LunarDream
최병규207 홈페이지 집입이 안되요  
Ju-rie 체크된 값들이 배열로 넘어가야하는데 안넘어가요 ㅠㅠ  
문현욱 초기화면을 프레임셋으로 설정한 후 관리자 페이지가 안 뜨는 현상