묻고답하기

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 남기남
와우 이런식으로 옷 코디하는거 ㅜㅜ 어떻게 구축하는건지 아시는분 계신가요?  
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
세걸 메뉴가 사라짐 [2] 2019.02.07 by 세걸
날제비 홈페이지 수정 관련 문의 드립니다. [1] 2019.02.07 by DoorWeb
우유 갑자기 문장들이 밀렸(?)어요! [3] file 2019.02.07 by DoorWeb
프리맨 index.php?mid=xxxxx 소스 편집 [7] file 2019.02.07 by LuisK
pspsps 설정된 번호 입력하고 다음페이지로 넘어가는것 질문입니다 file  
엠씨오리 Warning: fread() [function.fread]: Length parameter must be greater than 0 질문드립니다. [3] 2019.02.07 by 엠씨오리
코딩펀 <ul> <li> 태그가 안 먹힙니다! [1] 2019.02.06 by sejin7940
우유 tab 소스를 활용하는 방법을 알고 싶습니다.  
종합예술인 닉네임을 바꾸면 원래 썼던 글에는 적용 안되나요? [2] 2019.02.05 by 종합예술인
키미즈 PHP버전이 안맞는다네요 [3] file 2019.02.04 by sejin7940
11673e3 마켓플레이스!! 중고장터 관련해서 문의합니다~ [8] 2019.02.04 by 마이산
바크 포인트점수를 특정날짜 이후부터 보여주고 싶습니다. [1] 2019.02.03 by sejin7940
정글범 그누보드5(아미나빌더) VS XE 글내용검색노출  
별빛 관리자 페이지 문서에서 프로필사진 설정 [2] file 2019.02.03 by 별빛
마늘 확장변수로 정렬 및 검색시 너무느려요  
마늘 정렬에 따라서 게시판 속도가 다른게 정상인가요? [2] 2019.02.03 by 마늘
billy 팝업2개와 이미지 슬라이드 충돌 [1] file 2019.02.02 by DoorWeb
chorok 레이아웃 쇼핑몰 [1] 2019.02.02 by sejin7940
AimJin 게시판 분류(카테고리)별로 이미지 배너를 넣을 수 있나요? [11] 2019.02.01 by AimJin
슙슙 게시판 오류 도와주세요.. [3] file 2019.02.01 by LuisK
이와이 content 위젯 오류..? [6] 2019.02.01 by 이와이
AimJin 최근게시물에 사용자 정의 값을 노출할 수 있나요?? [3] 2019.02.01 by LuisK
그루터기46b8f 문서페이지 메뉴로 설정할때 모달창 없애는방법 [2] 2019.02.01 by 그루터기46b8f
CtrlV 모바일 에서는 외부페이지를 지원하지 않나요? [4] 2019.02.01 by CtrlV
리리즈 위젯페이지 복사 방법 없을까요? [1] 2019.01.31 by 리리즈