묻고답하기

첫번째 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 남기남
은배 도와주세요 홈페이지가 이상해졌어요 ㅠㅠㅠㅠ [1] 2010.11.18 by 때린데 또때려
은배 간절한 마음에 하나 더 올려용 ㅠㅠ [2] 2010.11.18 by 때린데 또때려
cade711 위젯설치 [1] 2010.11.18 by 때린데 또때려
유유히 제로보드xe 접속url 해결해주세요.. [1] 2010.11.18 by SeklutZ
푸른달빛 category_srl 값이 무엇인가요? [1] 2010.11.18 by SeklutZ
센스티브 일기장 스킨  
Akira제네 xe엔진에서 제가만든 페이지나 게시판등이 저장된 위치가 어딘가여? [3] 2010.11.18 by Gekkou
강동진 고수님들~ ㅠㅠ 프레임셋으로 나누면 생기는 하단스크롤 없애는방법좀 알려주세요 [1] 2010.11.18
이태일804 에디터에 글을 입력하지 않고도 등록이 가능하게 하고 싶습니다. [1] 2010.11.18 by plruto
불독796 게시판 브라우저 타이틀 [1] 2010.11.17 by 백성찬
김재연945 xml연동 네비게이션 링크문제 file  
공방 확장변수 보기에서 상하로 늘어나는 현상 file  
꽝이 포인트를 지불하고 글에대한 효과 내는 방법좀요..  
Jubeat. 제로보드 문제요  
쌈꾼 성인인증창 달때..  
얏홍이 에디터 기본 폰트 크기 조절  
grey''s 최근게시물 플래시로 제작?  
nzeo초보 게시판 하단에 나타나는 체크 사항 중 불필요한 삭제, 또는 게시판 크기 조절  
jjjnnn 틀에 안박힌? 홈페이지를 만들려면 어떻게해야 하나요  
으아악. 프로필 이미지 삽입 메뉴는 어떻게 설정하나요?