<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
<?php
$table1 = "free";
$table2 = "qna";
?>
<h3>자유게시판</h3>
<a href="board_view.php?table=<?=$table1?>&type=list"> 목록보기</a>
<br>
<a href="board_view.php?table=<?=$table1?>&type=write"> 글쓰기</a>
<h3>질의응답 게시판</h3>
<a href="board_view.php?table=<?=$table2?>&type=list"> 목록보기</a>
<br>
<a href="board_view.php?table=<?=$table2?>&type=write"> 글쓰기</a>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
<?php
$table = $_GET["table"];
$type = $_GET["type"];
if ($table == "free")
$board_title = "자유게시판";
if ($table == "qna")
$board_title = "질의응답 게시판";
if ($type == "list")
$type_title = "목록보기";
if ($type == "write")
$type_title = "글쓰기";
?>
<h3>
<?php
echo ">> ".$board_title." | ".$type_title;
?>
</h3>
</body>
</html>
'프로그래밍' 카테고리의 다른 글
쿠키 생성, 사용, 삭제 (0) | 2022.03.06 |
---|---|
아이디 비번 입력 (0) | 2022.03.06 |
게시판 (0) | 2022.03.06 |
조건문2(학점출력) (0) | 2022.01.08 |
조건문1 (0) | 2022.01.08 |