묻고답하기

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 남기남
rail_man 회원목록에서 관리자를 삭제하였습니다. [2] 2019.02.17 by rail_man
roks821 파일첨부동작?  
모던웹 첨부파일 자동본문삽입 안되게 할수는 없나요? [2] 2019.02.16 by orangehome
railman 이메일 인증시 오류가 발생하였습니다. file  
지나 게시판에 글 쓰고 등록 클릭하면 그대로 있네요... [2] 2019.02.15 by 지나
soyum**** php)다운로드 파일이 제대로 안보이는 오류 [2] file 2019.02.15 by soyum****
CtrlV 외부페이지 DB 불러오기가 왜 안될까요? [2] 2019.02.15 by CtrlV
inhyeparklee 설정>게시판정보>고급>'섬네일' 추가해도 저장하면 목록에서 사라짐 +썸네일 가려짐 file  
함형규 안녕하세요.. 도움 주실분..구합니다.. [1] 2019.02.14 by LuisK
T1000 메인 페이지에서 사진을 꽉 채우려고 하려면 [2] 2019.02.12 by T1000
꿀잠자요 잘못된 응답을 전송했습니다. 라고 뜹니다. [1] 2019.02.12 by LuisK
꿀잠자요 XE 사용 초보입니다. 로그인 오류로 아얘 접속이 안됩니다. [4] 2019.02.12 by 꿀잠자요
railman 홈페이지에서 상담신청 게시판을 만들고자 합니다. [1] 2019.02.12 by LuisK
김세환 XEDITION 레이아웃 모바일 로그인창 질문드립니다 [1] file 2019.02.11 by DoorWeb
야호딩동댕 스켓치북 모듈스킨 본문 버튼 수정 부탁드립니다. [2] file 2019.02.11 by 야호딩동댕
shoothing**** 스케치북5 게시판 체크박스 질문 좀 드릴께요 [4] 2019.02.10 by shoothing****
inhyeparklee 원본글 복사를 했는데, 댓글은 없네요. 댓글은 복사가 안되나요? [2] 2019.02.09 by inhyeparklee
삼무 홈페이지에 회원 가입하려는데 웹 페이지 미시지가 자꾸 떠는 것은 어떻게 헤야 하나요 [2] file 2019.02.09 by 삼무
크림스푸 코어 업로드 후 글자깨짐 [4] file 2019.02.09 by inhyeparklee
inhyeparklee 특정한 게시물만 깨지는 현상(+게시판 전체 글 깨짐) file  
정주신 웹페이지를 긁어온후 그값을 위젯으로 올릴수 없나요? [1] 2019.02.09 by 정주신
㉿반딧불 [zeroboard4] 한번 봐 주십시요. [1] 2019.02.08 by DoorWeb
날제비 홈페이지 추가 수정관련 문의 드립니다. [2] file 2019.02.08 by DoorWeb
shoothing**** 스케치북5 관리자 로그인시 체크박스가 안보여요 [3] file 2019.02.08 by sejin7940
david 웹사이트에 올려진 사진들이 나타나지 않습니다. [2] file 2019.02.08 by david
와우 이런식으로 옷 코디하는거 ㅜㅜ 어떻게 구축하는건지 아시는분 계신가요?  
arian 게시판에 html 입력시 사라지는 현상 [2] 2019.02.08 by arian
수현수진아빠 한사이트에서 다른 레이아웃을 적용할려면... [1] 2019.02.08 by sejin7940
키미즈 CORE 업그레이드와관련하여 궁금한게 있습니다 [4] 2019.02.07 by sejin7940
세걸 접속통계치 오차 [1] file 2019.02.07 by sejin7940