Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $islogin = false;
- if( isset($_SESSION['userid']) ){
- if( $_SESSION['userid'] ) {
- $islogin = true;
- }
- }
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Member</title>
- </head>
- <body>
- <div>
- <?php if( ! $islogin ): ?>
- <form action="login.php" method="POST">
- <label for="userid">아이디</label>
- <input type="text" id="userid" name="userid" placeholder="your id...">
- <label for="userpw">비밀번호</label>
- <input type="password" id="userpw" name="userpw">
- <button type="submit">로그인</button>
- </form>
- <form action="join.php" method="POST">
- <h1>회원가입</h1>
- <label for="uid">아이디</label>
- <input type="text" id="uid" name="uid"><br>
- <label for="uname">이름</label>
- <input type="text" id="uname" name="uname"><br>
- <label for="upw">비밀번호</label>
- <input type="password" id="upw" name="upw"><br>
- <button type="text">가입하기</button>
- </form>
- <?php else: ?>
- <form action="logout.php" method="GET">
- <?php echo $_SESSION['userid'];?>
- <?php echo $_SESSION['username'];?>
- <button type="submit">로그아웃</button>
- </form>
- <?php endif ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement