묻고답하기

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 남기남
787dreamliner 사이트 이전시 첨부파일 손상 [1] 2018.12.28 by 787dreamliner
정민이 특정화면에서 controller 응답값을 못받아 오는 이유  
상해파 xe 버젼 확인 방법은? [2] 2018.12.27 by 상해파
황마마 스케치북5 모바일 보드스킨 검색창이 안나오네요 [2] 2018.12.27 by 티지레몬
레전드 방문자의 접근을 혀용하고 싶습니다. [2] file 2018.12.27 by 레전드
짱구삼촌 minishopXE 인증코드받는 방법 [4] 2018.12.27 by 짱구삼촌
레전드 홈페이지화면에 에러 문구가 뜹니다 도와주세요~ [2] file 2018.12.27 by 레전드
넓은바다 xe 모바일접속 통계볼려면 모바일 레이아웃에도 애널리틱스 코드 넣어야되나요? [1] file 2018.12.26 by 즈베즈다
쟈니 댓글 50개 이상 작성시 접기 file  
웨마 마우스 롤오버시 목록이미지에 생기는... file  
질투 글제목 옆에 사진 아이콘이 보이게 하는 방법이.. [2] file 2018.12.26 by 질투
이택진 [포토샵-도트아트] 크기조절... [6] 2018.12.26 by 이전생
dkexpress 로그인 문제입니다. [1] 2018.12.26 by sejin7940
dal 보안테스트에서 XSS 취약점 해결하라는데요...  
soonpu**** xedition 오른쪽 메뉴 [2] file 2018.12.24 by soonpu****
안느 jsp소스 -> php소스 변환 가능하실까요?  
enjoyfun 검색창 사이즈를 살짝 줄이고 싶어요 ㅠㅠ [1] file 2018.12.24 by DoorWeb
tohappy 로그인 후 js호출문제  
베이스 업데이트 후 페이지수정 들어가면 저장버튼이 사라졌습니다. file  
상해파 xe에서 json 호출관련 문의 드립니다.  
키미즈 게시물이 어떤건 보이고 어떤건 안보입니다 [2] 2018.12.22 by 차니맘
구덱스 XE 글쓰기가 갑자기 안되네요. [2] file 2018.12.22 by 차니맘
가상 cashbook을쓰고 싶은데요 에러 [1] 2018.12.21 by sejin7940
아름드리나무 기본레이아웃 쓰는데요~ [2] file 2018.12.21 by 아름드리나무
검은내일 xe 템플릿 변수를 php로 옮기는 방법이 궁금합니다. [1] 2018.12.21 by 검은내일
기광공 모바일 뷰에서 정상 화면이 나오게 하고 싶어요. [1] file 2018.12.21 by DoorWeb
FFLV 추천수 0이면 안뜨게 하고 싶은데 어떻게 해야 하나요? [2] file 2018.12.21 by FFLV
개똥이다 모듈에 국가 코드중 중국어 추가 하면 오류가 납니다.  
쟈니 게시글 등록, 댓글 등록 단축키 [2] 2018.12.20 by 쟈니
쟈니 익명게시판에서 댓글 작성자 클릭시 댓글에 표시하게할수는 없을까요?