댓글쓰기
전체적인 틀 HTML/study-php/
pages/main.php
assets/css, fonts, img / 파일저장
connect/connect.php
include/header.php, footer.php
connect/connect.php 에 'MySQL' 작성
<?php
$host = "localhost";
$user = "사용자아이디";
$pw = "패스워드";
$db = "사용자아이디";
$connect = new mysqli($host, $user, $pw, $db);
$connect -> set_charset("utf8");
if(mysqli_connect_errno()){
echo "Database Connect False";
} else {
//echo "Database Connect True";
}
?>댓글쓰기 (Comment)
1. comment/comment.php (전송된 데이터 출력 & HTML 양식저장)
공통 HTML 오려두기 (php로 따로 저장)
include/header.php, footer.php
댓글쓰기 TABLE 생성
2. create/createComment.php
3. comment/commentSave.php (댓글쓰기 데이터 입력)
Last updated
Was this helpful?