묻고답하기

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 남기남
개다 익명 게시판일 때 푸시가 오면 상대방 닉네임이 노출되더라구요  
세걸 네이버 아이디 로그인 [1] 2019.04.01 by sejin7940
세걸 ssd HHD 조합으로 웹서비스 설정 [1] 2019.04.01 by 세걸
개다 홈이 로딩도 느리고 무거운 느낌인데 [1] file 2019.04.01 by 세걸
세걸 쉬운설치가 안됩니다. [3] 2019.04.01 by 세걸
GSJ 레이아웃에서 변경 후 로그인이랑 검색이 안보여요ㅠㅠ  
ILMARE 첨부파일 확장자 소문자로 자동변환방법이 궁굼합니다  
손주사랑 new post에게시판 제목 나오게하는 방법좀 부탁 드립니다 file  
Spooky 모바일에서만 '권한이 없습니다'가 나오는 이유가 궁금합니다. [1] 2019.03.29 by Spooky
우주 새글 표시 모듈이 작동하지 않습니다. file  
숲지기 자동으로 \(원표시)가 입력되면서 레이아웃이 초기화됩니다. [1] 2019.03.29 by 숲지기
세걸 조회수 표시& 검색문제 [2] 2019.03.29 by 세걸
마이산 판매자 연락처 보기 변경 file  
피피 팝업창이 뜨질 않습니다.  
기가 네이버로 접속하여 로그인시 에러 [2] 2019.03.28 by 기가
rail_man 섬네일 비율을 "크롭"으로 설정하였음에도 원본비율로 노출됩니다.  
웅쿠미 달력모듈 게시판 사용시 첫 화면 [2] file 2019.03.27 by 웅쿠미
김인호 엮인글 문의 드립니다. [6] 2019.03.27 by sejin7940
테란 xe 스킨 복사방법 [2] 2019.03.27 by 테란
가츠 모바일 도메인(cafe24) 사용시 로그인오류 현상 [1] 2019.03.26 by DoorWeb
herrwook 개인 서버에 그간 사진을 한꺼번에 올리려는데요...  
-f99d7 회원가입시 실명 인증 시스템 [1] 2019.03.26 by sejin7940
어거지 게시글을 등급별로 볼수 있을까요? [1] 2019.03.26 by 디자인클립
dkexpress 화면 왼쪽에 있는 링크 주소를 바꿔야 하는데.... 첨이라 잘 모르겠네요..... 도와 주세요.  
개발자티케 사이트메뉴편집에서 메뉴가 안나옵니다. [7] file 2019.03.25 by 이원희884
forgnhan 에라가 이렇게 뜹니다.  
qweasdz**** 게시판 관련 [2] file 2019.03.25 by qweasdz****
아놔진짜 특정 게시판 글쓰기시 특정 bash 스크립트 실행 방법?  
fasflpelqwe 위키모듈을 사용하고 싶은데 오류가 납니다. 도와주세요.. [1] 2019.03.25 by sejin7940
headkim 메인화면 꾸미기 [1] 2019.03.25 by DoorWeb