부족한 부분
조회수 증가시 새로고침 할때마다 증가하는데 중복되지 않고 한번만 증가할 수 있도록 구현하는 게 좋을 것 같다
글 상세내용에서는 글의 기본적인 내용들이 출력되고
글 작성자에 한해서 수정 / 삭제버튼을 확인할 수 있다
게시판 리스트에서 글 제목에 a 태그를 걸어줬다

read.php?bno='bno값' 을 입력해서 해당 글 내용으로 이동하게된다
read.php
<?php
//list 에서 넘어온 글 저장
$bno = $_GET["bno"];
$query = "select * from board where bno='$bno'";
//조회수 업데이트
$query_view = "update board set view = view + 1 where bno = '$bno'";
//쿼리 실행
$result = mysqli_query($connect,$query);
$result2 = mysqli_query($connect,$query_view);
$row = mysqli_fetch_array($result);
?>
<table class="table">
<thead>
<tr class="table_tr">
<th colspan="4" class="title"><?php echo $row['title']?></th>
</tr>
</thead>
<tbody>
<tr>
<td class="view">글쓴이</td>
<td class="view"><?php echo $row['userid']?></td>
<td class="view">작성일</td>
<td class="view"><?php echo $row['date'] ?></td>
<td class="view">조회수</td>
<td class="view"><?php echo $row['view']?></td>
</tr>
<tr>
<td class="content"><?php echo $row['content']?></td>
</tr>
</tbody>
</table>
<?php
// 글 작성자만 버튼 활성화
if($_SESSION['userid'] == $row['userid']){ ?>
<button onclick="location.href='update.php?bno=<?=$row['bno'] ?>'">수정</button>
<!-- bno 넘겨주기 -->
<button onclick="location.href='delete_ok.php?bno=<?=$row['bno'] ?>'" >삭제</button>
<?php } ?>
<button onclick="location.href='list.php'">목록으로</button>
1. get을 통해 넘어온 bno를 저장하고
2. 조회수 증가
update문을 통해 view컬럼을 1씩 증가시킨다
$query_view = "update board set view = view + 1 where bno = '$bno'";
$result2 = mysqli_query($connect,$query_view);
3. 글 작성자만 버튼 출력
로그인할때 session을 저장했으니까 session의 아이디와
db에저장된 글의 작성자가 동일하다면 버튼을 출력시킨다
각 버튼 클릭시 bno값을 가지고 페이지가 이동된다

