이름 |
<%@page import="member.dao.MemberDAO"%>
<%@page import="member.dto.MemberDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String id = (String) session.getAttribute("memberId");
MemberDAO dao = new MemberDAO();
MemberDTO dto = dao.search(id);
String tel = dto.getTel();
String tel_1 = tel.substring(0,3);
String tel_2 = tel.substring(3,7);
String tel_3 = tel.substring(7);
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>modifyForm.jsp</title>
<style type="text/css">
h2 {
margin-left: 200px;
}
table, tr, td {
border: 1px solid black;
border-collapse: collapse;
padding: 10px;
}
.title {
width: 120px;
text-align: center;
}
</style>
<script type="text/javascript" src="../script/memberscript.js?after"></script>
</head>
<body>
<h1>회원정보 수정</h1>
<br>
<form name="modifyForm" action="modify.jsp" method="post">
<table>
<tr>
<td class="title">이름</td>
<td><input type="text" name="name" value="<%=dto.getName() %>"/></td>
</tr>
<tr>
<td class="title">아이디</td>
<td><input type="text" name="id" value="<%=id %>" readonly/></td>
</tr>
<tr>
<td class="title">비밀번호</td>
<td><input type="password" name="pwd" value="<%=dto.getPwd() %>"/></td>
</tr>
<tr>
<td class="title">비밀번호 확인</td>
<td><input type="password" name="repwd" value="<%=dto.getPwd() %>"/></td>
</tr>
<tr>
<td class="title">성 별</td>
<td>
<%if(dto.getGender().equals("M")) { %>
<input type="radio" name="gender" value="M" checked/><label for="genderM">남</label>
<input type="radio" name="gender" value="F"/><label for="genderF">여</label>
<%} else { %>
<input type="radio" name="gender" value="M"/><label for="genderM">남</label>
<input type="radio" name="gender" value="F" checked/><label for="genderF">여</label>
<%} %>
</td>
</tr>
<tr>
<td class="title">E-mail</td>
<td>
<input type="text" name="email" value="<%=dto.getEmail() %>" size="10" autocomplete="nope"/>
<input type="text" name="domain" value="<%=dto.getDomain() %>"/>
</td>
</tr>
<tr>
<td class="title">핸드폰</td>
<td>
<input type="text" name="tel_1" value="<%=tel_1 %>" size="3" maxlength="3"/> -
<input type="text" name="tel_2" value="<%=tel_2 %>" size="4" maxlength="4"/> -
<input type="text" name="tel_3" value="<%=tel_3 %>" size="4" maxlength="4"/>
</td>
</tr>
<tr>
<td class="title">주 소</td>
<td><input type="text" name="addr" value="<%=dto.getAddr() %>" size="50"/></td>
</tr>
<tr>
<td class="title" colspan="2">
<input type="button" value="수정완료" onclick="checkModify()"/>
<input type="reset" value="다시작성"/>
</td>
</tr>
</table>
</form>
</body>
</html>
|