묻고답하기

DB연동하여 아이디를 불러오는것인데 DB에 존재하는 아이디의 이름과 주민번호를 입력하여도

없는 것처럼 화면이 뜨네요.. 너무 어려워서 이곳에 질문남겨봅니다....

 

<아이디찾기 폼>

<%@ page contentType="text/html;charset=euc-kr" %><html><head>

<meta http-equiv="content-type" content="text/html; charset=euc-kr">

<meta name="generator" content="Namo WebEditor(Trial)"></head>

<body><form name="searchId" method="post" action="viaId.jsp">

<table width="720px"  border="0"  height="430px" align="center"   >   <tr>    <td>

     <table width="450px" align="center"  border="0" style="color:black; background-color: #F6F6F6; font-size:20px; ">

    <tr>    <td>     <table width="750px" align="center" border=0; style="background-color:white; margin-top:3%" >

      <tr>       <td>아이디 찾기</td>       <td><div id="sub-title"> |  회원정보에 등록한 정보로 아이디를 찾습니다.</td>

       <td style="width:300px"></td>      </tr>     </table>    </td>     </tr>    <tr>     <td>

   <table width="600px"  height="300px" align="center" border="0"  style=" background-color:none; border:dotted 5px none;">

    <tr>     <td>      <table width="400px"  border="0" style="margin-top:3%">       <tr>

        <td><div id="middle-title"> 이름과 핸드폰 번호를 입력해주세요.</div>

        </td>       </tr>      </table>     </td>    </tr>    <tr>     <td>

      <table width="380px" align="center" border="0" style="font-size:19px" >

       <tr>        <td>이름</td> <td><input type=text name="name"></td>

       </tr>       <tr> <td>주민등록번호 </td> <td>

<input type=text name=joomin1 size=6> -<input type=text name=joomin2 size=7>

</td> </tr>      </table>     </td>    </tr>    <tr>     <td>

      <table width="150px"  align="center" border="0" style="margin-top:-10%">

       <tr>

        <td><input type="submit" name="search" value="찾기" class="btn btn-primary">

         <input type="button" name="cancel" value="취소" class="btn btn-primary" onclick="location.href='index.jsp'"></td>

       </tr>      </table>     </td>    </tr>  </table> </td></tr></table></td></table></form>

</body></html>

 

(아이디찾기결과.jsp)

<%@ page contentType="text/html;charset=euc-kr" %>

<%@ page import="java.sql.*" %>

 

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=euc-kr">

<title>아이디찾기   </title>

 

 <style type="text/css">

     a:link { text-decoration: none; color: black; }           <!-- 클릭하기전의 설정은 선없고 검정색 -->

     a:visited { text-decoration: none; color: black; }     <!-- 방문한뒤의 설정은 밑줄없고 검정 -->

     a:hover { text-decoration: underline; color:blue; } <!-- 마우스가 올라갈때 설정은 아랫줄있고 파랑 -->

 </style>

 

</head>

 

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">

 

<%

try {

  String DB_URL="jdbc:mysql://localhost:3306/project";   //  DB명이 project임에 주의!(모든 소스코드 확인!)

     String DB_ID="multi"; 

     String DB_PASSWORD="abcd";

   

Class.forName("org.gjt.mm.mysql.Driver");  

  Connection con = DriverManager.getConnection(DB_URL, DB_ID, DB_PASSWORD); 

request.setCharacterEncoding("euc-kr");

 

    String name = request.getParameter("name");            //  로그인폼(login.jsp)에서 입력한 ID를 넘겨받음

    String joomin1 = request.getParameter("joomin1");

String joomin2 = request.getParameter("joomin2");

String joomin = joomin1 + "-" + joomin2; //  로그인폼(login.jsp)에서 입력한 PW를 넘겨받음

 

     //  로그인폼(login.jsp)에서 입력한 ID를 포함한 레코드를 member 테이블에서 조회함

    String jsql = "select  memId  from member where memName = ? and memJoomin = ?"; 

    PreparedStatement pstmt = con.prepareStatement(jsql);

    pstmt.setString(1, name);

pstmt.setString(2, joomin);

 

    ResultSet rs = pstmt.executeQuery(); 

 

    if(rs.next()){

        {

}   

         

} else {  

%>

      <br><br><br>

  <center>

      <font color=red size=6><b><아이디 찾기 오류!></b></font><p><br><br>

      <font color=black size=2>

            입력하신정보가 잘못 되었습니다.  다시 확인해 주세요!<p>

이전 페이지로 돌아가시려면 

<a href="Serchid.jsp" ><font color=red>이전단계</font></a>를 클릭하시고, <p>

회원가입 페이지로 가시려면 

<a href="insertmember.jsp" ><font color=red>회원가입</font></a>를 클릭하세요!

</font>              

</center>

<%

    } }

catch (Exception e) {

    out.println(e);

}

%>

</body>

</html>

태그 연관 글
  1. [2016/12/21] 묻고답하기 고수님들 제발 도와주세요. 창크기에 따라서 위젯 위치가 자꾸 변합니다 by 립샤 *1
  2. [2015/07/08] 묻고답하기 박스모듈에 이미지삽입 by naomiblack
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
jin08 seo모듈 설치문의 [1] 2019.04.11 by sejin7940
베니 <body> 수정하는 방법 문의드립니다. [2] 2019.04.11 by 베니
그랜트 1.5 업데이트 이후 plannerXE123 일정 표시안됨 [1] 2019.04.11 by chorok
chorok PlannerXE123 업데이트 후 오류 file  
쪼리짱 게시판 첨부파일 업로드시 100% 이후 파일 업로드가 안됩니다. [2] file 2019.04.10 by SimpleCode
이와이 특정 페이지의 영문으로 바로 가는 링크 [1] 2019.04.10 by sejin7940
음메 페이지 비공개 [1] 2019.04.10 by SimpleCode
BarryWhite 회원 가입 시 버튼 누르면 서버오류가 뜨네요. [1] file 2019.04.09 by BarryWhite
동혀니 모바일 페이지 도움주실분 찾아요.  
『나』『na』 게시판 가로스크롤을 없애는 방법좀요.. [2] 2019.04.09 by 생크림
incation 첨부파일 순서 좀 바꾸고 싶음 file  
Hees 게시판 썸네일목록은 출력되는데 클릭하면 게시물 내용이 안나옵니다. [2] file 2019.04.08 by Hees
천하무적c8ea4 '요청한 파일을 찾을 수 없습니다.'라는 메세지 나옵니다.  
베니 네이버 애널리틱스 수집이 안되네요;; file  
PAIN php로 포인트저장 [5] 2019.04.06 by PAIN
윈터서버 https://woto.net/ 웹호스팅 업체 설치문제 [4] 2019.04.06 by 우주학개론
nong 알려주세요  
바보멍청이 데이터 이전 툴 - php.ini 환경설정에서 원격지의 파일을 열지 못하도록 되어 있습니다. [10] file 2019.04.05 by 디자인클립
chorok 무슨 기반으로 제작된 사이트일까요? [1] file 2019.04.05 by 디자인클립
rail_man 회원가입시 이메일 인증 [1] 2019.04.05 by sejin7940
댄져러스 탈퇴방법좀 해외사이트 이것좀해석해주세요 file  
결이아빠 ssl 문제가 확실한데..어떻게 해야할지..  
결이아빠 어떻게 수정하면 될까요?  
이퓨 회원가입 select 폼 형식 입력값 불러오기 질문 file  
한이흔 이미지 첨부 후 본문 삽입시 문제...몇일째 해결이 안돼여.. [1] 2019.04.02 by 결이아빠
일과여행 카톡으로 도메인을 전송하면 자동으로 나오는 이미지를 바꿀 수 없나요? [1] file 2019.04.02 by 디자인클립
모로지로 홈에 문서 이미지 넣기 문의드려요.. [2] 2019.04.02 by 모로지로
소라db952 cycle-pager 배너에 a 링크를 걸면 배너 이미지가 풀려요ㅠ [2] 2019.04.02 by 소라db952
검은고양이냐옹 레이아웃 스킨의 메뉴에 선을 하나 긋고 싶어요.. [5] file 2019.04.02 by DoorWeb
Krazee content 위젯 사진 교체 방법?? [1] file 2019.04.01 by 디자인클립