댓글쓰기

전체적인 틀 HTML/study-php/

42KB
Open
main.php 파일
7MB
archive
Open
css 폴더 zip파일

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)

댓글쓰기 파일생성

comment/comment.php, commentSave.php

create/createComment.php

1. comment/comment.php (전송된 데이터 출력 & HTML 양식저장)

10KB
Open
comment.php (데이터와 HTML을 포함한 전체코드)

공통 HTML 오려두기 (php로 따로 저장)

include/header.php, footer.php

2KB
Open
include 폴더 zip 파일

댓글쓰기 TABLE 생성

2. create/createComment.php

3. comment/commentSave.php (댓글쓰기 데이터 입력)

Last updated

Was this helpful?