묻고답하기

<!-- poll.html -->
<html>
<head>
<title> php예제 </title>
<script>
        function checknsubmit(){
                var data = document.mainform;
                if(!data.ans.value){
                        alert('하나를 선택해 주십시오.');
                        return;
                }
                data.submit();
}
</script>
</head>
<body bgcolor=white>
<center>
        <form method=post action=poll_post.php name=mainform>
         <input type=hidden name=number value='<?echo $number;?>'>
         <table border=1 cellspacing=0 cellpadding=5 bordercolor=#ffccff>
         <tr>
         <td>
         <table border=0 cellspacing=2 cellpadding=0>

<?
$conn = mysql_connect('localhost','root','apmsetup');
mysql_select_db('sadm', $conn);

$query = "select issue,ans1,ans2,ans3,ans4,ans5,ans6,ans7,ans8,edate from poll";
$query.= " where number = $number";

$result = mysql_query($query , $conn);
$data =  mysql_fetch_array($result);              <!--33번 에러 자리-->

if(!$data[edate]){
        echo("
                                <tr>
                                        <td colspan=2 align=center bgcolor=#dddddd>
                                <b> $data[issue] </b>
                                        </td>
                                        </tr>
");

                                if($data[ans0]){
                                        echo("
                                        <br>
                                                <td align=center bgcolor=#dddddd> $data[ans0] </td>
                                        <td bgcolor=#eeeeee><input type=radio name=ans value=0></td>
                                        </tr>
                                                ");
                                }

                                if($data[ans1]){
                                        echo("
                                        <br>
                                                <td align=center bgcolor=#dddddd> $data[ans1] </td>
                                        <td bgcolor=#eeeeee><input type=radio name=ans value=1></td>
                                        </tr>
                                                ");
                                }
                                if($data[ans2]){
                                        echo("
                                        <br>
                                                <td align=center bgcolor=#dddddd> $data[ans2] </td>
                                        <td bgcolor=#eeeeee><input type=radio name=ans value=2></td>
                                        </tr>
                                                ");
                                }
                                if($data[ans3]){
                                        echo("
                                        <br>
                                                <td align=center bgcolor=#dddddd> $data[ans3] </td>
                                        <td bgcolor=#eeeeee><input type=radio name=ans value=3></td>
                                        </tr>
                                                ");
                                }
                                if($data[ans4]){
                                        echo("
                                        <br>
                                                <td align=center bgcolor=#dddddd> $data[ans4] </td>
                                        <td bgcolor=#eeeeee><input type=radio name=ans value=4></td>
                                        </tr>
                                                ");
                                }
                                if($data[ans5]){
                                        echo("
                                        <br>
                                                <td align=center bgcolor=#dddddd> $data[ans5] </td>
                                        <td bgcolor=#eeeeee><input type=radio name=ans value=5></td>
                                        </tr>
                                                ");
                                }
                                if($data[ans6]){
                                        echo("
                                        <br>
                                                <td align=center bgcolor=#dddddd> $data[ans6] </td>
                                        <td bgcolor=#eeeeee><input type=radio name=ans value=6></td>
                                        </tr>
                                                ");
                                }
                                if($data[ans7]){
                                        echo("
                                        <br>
                                                <td align=center bgcolor=#dddddd> $data[ans7] </td>
                                        <td bgcolor=#eeeeee><input type=radio name=ans value=7></td>
                                        </tr>
                                                ");
                                }        


}
else{
        echo("
                        <tr>
                                <td colspan=2 align=center>
                                <b> $data[issue] </b>
                                <br>
                                이 설문은 $data[edate] 에 종료하였습니다 <br>
                                </td>
                                </tr>
                                ");
}




?>
<tr>
<td colspan=2 align=center>
<input type=button value='확인' onclick=javascript:checknsubmit{}>
[<a href=poll_view.html?number=<?echo $number;?>> 결과보기 </a>]
</td>
</table>
</td>
</tr>
</table>
</form>
</center>
</body>
</html>

--------------------------------------------------------------------------------

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:apm_setuphtdocssadmpoll.html on line 33

이렇게 뜨거든요? mysql_fetch_array(); 만 쓰면 이런에러가 자주 나요 ㅡ.ㅜ 알려주세요~
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
zartin 모바일 편집하면 왜 화면이 검은색으로 나오죠? [2] file 2014.03.21 by zartin
TakeUrban 업데이트 에러 메세지  
차밍 스케치북 갤러리 게시판을 사용할 때 썸네일 질문입니다.  
생까는즐거움 XE 예전버전 어디서 다운받나요 [2] 2014.03.21 by 생까는즐거움
제제 1.4.1.1 -> 1.7.4로 코어 업데이트후 사이트메뉴편집이 안떠요. [3] 2014.03.21 by five
곰탕lol왕자 도메인..;;; 이거 어떻게 설정해야될까요 [1] 2014.03.21 by 곰탕lol왕자
아기나옹이 누리고 쇼핑몰 결제 설정을 현금으로 못하나요? [3] 2014.03.21 by 아기나옹이
sirisic 회원가입 항목 수정이 안되요 도와주세요 [2] 2014.03.21 by sirisic
BESETO 첨부파일이 있는 게시물을 이동시, 확장변수가 이동되지 않아요. [2] 2014.03.21 by GG
꿀댕이 [묻기] CAFE List 폰트 사이즈 키우는법 [3] file 2014.03.21 by 꿀댕이
GAIA100 레이아웃 미사용시 회원가입문제 [1] 2014.03.21 by pell
포도주스 사용자 정의 변경 도와주세요~ [2] 2014.03.21 by 포도주스
Lemon Tree 쿡래빗 레이아웃 "최신글보기"가 최하단에서 반복되는 문제 [4] file 2014.03.21 by pell
홍길동친구 게시판 관리 > 게시판 정보에 상단, 하단내용이 사라짐 file  
Lemon Tree 최신글 보기에 "썸네일 없이" 제목과 내용을 보이게 하려면 [2] file 2014.03.21 by Lemon Tree
lililiillililiil XE https 걸린 이미지 링크시 썸네일을 생성하지 못하는 현상  
오락실주인 XE 제작된 해외사이트 [3] 2014.03.21 by bangkoksnaps
메이커즈마커 mysql 에서 게시판 DB복구방법...어떻게 하죠 [2] file 2014.03.21 by 메이커즈마커
GAIA100 contact 게시판 및 사용자정의 문의 file  
코멧 최근게시물 위젯에서 특정확장변수의 값이 있는 게시물만 출력 [2] 2014.03.21 by 코멧