'로그인'에 해당되는 글 1건

IT/PHP

[php게시판 만들기] 로그인 화면

로그인 화면을 만들어 보려 합니다. 

화면은 아래 그림과 같이 만들겠습니다.

login.php

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html>
 
<head>
 
<style type="text/css">
   .topline{border-top:2px solid black;
   } /*위쪽에 줄을 긋는다*/
   .botline{border-bottom:2px solid black; 
   }/*아래쪽에 줄을 긋는다*/
   .buttonline{border-top:2px solid black; 
               border-bottom:2px solid black; 
   }/*위, 아래쪽에 줄을 긋는다*/
 a:visited {text-decoration: none; color: #333333; 
 }
 
</style>
 
</head>
 
<body>
 
 
<h1>  <p align=center>로그인</p> </h1>
<!-- 로그인 버튼 클릭시 post형식으로 logincheck.php로 넘긴다. id, pass 검사하는 php파일 --> 
<form method='post' action='logincheck.php'
    <table align=center border=0 cellspacing=0 width=500 bordercolordark=white bordercolorlight=#999999<!-- table생성 -->
        <tr<!-- table 1행 생성 -->
            <td class="topline" width=150>  <!-- table 1행1열 생성 -->
                <p align=center>아이디(이메일)</p>
            </td>
            <td class="topline" width=200<!-- table 1행2열 생성 -->
                <input type="email" name="email" style="height:25px">
            </td>
 
            <td class="buttonline" rowspan="2" align=center>  <!-- table 3열 생성, 열2개를 합침 -->
                <button type="submit" style="height:100px; width:130px">로그인</button>
            </td>
 
        </tr>
 
        <tr<!-- table 2행 생성 -->
            <td class="botline" width=150>  <!-- table 2행1열 생성 -->
                <p align=center>비밀번호</p>
            </td>
 
            <td class="botline" width=200<!-- table 2행2열 생성 -->
                <input type="password" name="password" style="height:25px">
            </td>
 
        </tr>
 
        <tr><!-- table 3행 생성 -->
           <td colspan=3 align=center<!-- table 3행 1,2,3열 합쳐서 ㅐㅇ성 -->
              <!-- 회원가입 버튼클릭ㅣ register.php호출 -->
              <a href="register.php" target="_self" style="text-decoration:none">회원가입 하시겠습니까?</p
           </td>
        </tr>
    </table>
</form>
 
</body>
</html>
cs

소스내에 최대한 주석을 달았습니다. 소스보시면 얼추 이해가 가실거라 생각합니다.

login.php로 저장을 한뒤, 저번에 설치한 xampp를 실행 시키고, 

xampp의 root경로(c:\xampp\htdocs\login.php)에 파일을 두고 브라우저 주소창에 localhost/login.php라고 검색을 하면

제일 위의 그림같이 로그인 화면이 나오심을 볼 수 있습니다.


,

최근 댓글

최근 트랙백

알림

이 블로그는 구글에서 제공한 크롬에 최적화 되어있고, 네이버에서 제공한 나눔글꼴이 적용되어 있습니다.

링크

카운터

Today :
Yesterday :
Total :