PHP 개발 소규모 포럼 튜...LOGIN

PHP 개발 소규모 포럼 튜토리얼 새 게시물 게시-1

저희가 새로 작성한 게시물의 내용은 다음과 같습니다

30.jpg

코드는 다음과 같습니다

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加新帖</title>
    <style>
        .title{
            background-color: #B10707;
            color: white;
        }
        .sub{
            text-align: center;
        }
        .but{
            background-color: #B10707;
            width: 90px;
            height: 40px;
            font-size: 15px;
            color: white;
            border: none;
        }
        input{
            width: 250px;
            height: 25px;
        }
        .right{
            margin-left: 10px;
        }
    </style>
</head>
<body>
<form method="post" action="addnew_post.php">
    <table width="500px" border="1" cellpadding="8" cellspacing="0" align="center">
        <tr class="title">
            <td colspan="2">
                编辑帖子<span class="right">[<a style="color: white" href="forums.php">返回</a> ]</span>
            </td>
        </tr>
        <tr>
            <td width="100px">作者</td>
            <td><input type="text" name="author"></td>
        </tr>
        <tr>
            <td width="100px">标题</td>
            <td><input type="text" name="title"></td>
        </tr>
        <tr>
            <td width="100px">内容</td>
            <td><textarea cols="43" rows="15" name="content">
            </textarea></td>
        </tr>
        <tr class="sub">
            <td colspan="2">
                <input type="submit" value="发布" class="but">
                <input type="reset" value="重置" class="but">
            </td>
        </tr>
    </table>
</form>
</body>
</html>

팁: 아직 사용자가 로그인했는지 여부를 판단하지 않았습니다. 나중에 전체 코드를 요약하겠습니다


The 다음 단계는 데이터가 처리를 위해 addnew_post.php 페이지로 전달되는 것입니다


다음 섹션
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
코스웨어