4. 로그인, 회정정보수정 페이지 수정
페이지 정보
작성자 관리자 댓글 0건 조회 1,765회 작성일 21-05-22 17:51본문
4. 로그인, 회정정보수정 페이지 수정
입력폼에서 자바스크립트를 이용하여 필수 입력사항을 검사하는 처리를 추가합니다.
1. 로그인폼 페이지
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>로그인</title>
<link rel="stylesheet" type="text/css" href="./css/common.css">
<link rel="stylesheet" type="text/css" href="./css/login.css">
<script type="text/javascript" src="./js/login.js"></script>
</head>
<body>
<header>
<?php include "header.php";?>
</header>
<section>
<div id="main_content">
<div id="login_box">
<div id="login_title">
<span>로그인</span>
</div>
<div id="login_form">
<form name="login_form" method="post" action="login.php">
<ul>
<li><input type="text" name="id" placeholder="아이디" ></li>
<li><input type="password" id="pass" name="pass" placeholder="비밀번호" ></li>
<!-- pass -->
</ul>
<div id="login_btn">
<a href="#"><img src="./img/login.png" onclick="check_input()"></a>
</div>
</form>
</div> <!-- login_form -->
</div> <!-- login_box -->
</div> <!-- main_content -->
</section>
<footer>
<?php include "footer.php";?>
</footer>
</body>
</html>
2. 회원정보 수정 페이지
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>회원정보 수정</title>
<link rel="stylesheet" type="text/css" href="./css/common.css">
<link rel="stylesheet" type="text/css" href="./css/member.css">
<script type="text/javascript" src="./js/member_modify.js"></script>
</head>
<body>
<header>
<?php include "header.php";?>
</header>
<?php
$con = mysqli_connect("localhost", "user1", "12345", "sample");
$sql = "select * from members where id='$userid'";
$result = mysqli_query($con, $sql);
$row = mysqli_fetch_array($result);
$pass = $row["pass"];
$name = $row["name"];
$email = $row["email"];
mysqli_close($con);
?>
<section>
<div id="main_content">
<div id="join_box">
<form name="member_form" method="post" action="member_modify.php?id=<?=$userid?>">
<h2>회원 정보수정</h2>
<div class="form id">
<div class="col1">아이디</div>
<div class="col2">
<?=$userid?>
</div>
</div>
<div class="clear"></div>
<div class="form">
<div class="col1">비밀번호</div>
<div class="col2">
<input type="password" name="pass" value="<?=$pass?>">
</div>
</div>
<div class="clear"></div>
<div class="form">
<div class="col1">비밀번호 확인</div>
<div class="col2">
<input type="password" name="pass_confirm" value="<?=$pass?>">
</div>
</div>
<div class="clear"></div>
<div class="form">
<div class="col1">이름</div>
<div class="col2">
<input type="text" name="name" value="<?=$name?>">
</div>
</div>
<div class="clear"></div>
<div class="form email">
<div class="col1">이메일</div>
<div class="col2">
<input type="text" name="email" value="<?=$email?>">
</div>
</div>
<div class="clear"></div>
<div class="bottom_line"> </div>
<div class="buttons">
<img style="cursor:pointer" src="./img/button_save.gif" onclick="check_input()">
<img id="reset_button" style="cursor:pointer" src="./img/button_reset.gif"
onclick="reset_form()">
</div>
</form>
</div> <!-- join_box -->
</div> <!-- main_content -->
</section>
<footer>
<?php include "footer.php";?>
</footer>
</body>
</html>
첨부파일
- member_css2.zip (11.3K) 25회 다운로드 | DATE : 2021-05-22 17:57:24
댓글목록
등록된 댓글이 없습니다.