commit de9583cfed060e8e59e1ab73cb62ef18878ef57c Author: choibk Date: Wed Dec 3 21:15:10 2025 +0900 1 diff --git a/config/dbconfig.php b/config/dbconfig.php new file mode 100644 index 0000000..e351aee --- /dev/null +++ b/config/dbconfig.php @@ -0,0 +1,23 @@ +setAttribute(PDO::ATTR_EMULATE_PREPARES, false); // 실제 prepared statement 사용 + $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); // 버퍼링 쿼리 + $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // 예외 던지기 + + //echo "DB 연결 성공"; + +} catch (PDOException $e) { + echo $e->getMessage(); +} diff --git a/config/member.php b/config/member.php new file mode 100644 index 0000000..9e4709f --- /dev/null +++ b/config/member.php @@ -0,0 +1,22 @@ +conn = $db; // PDO 객체 주입 + } + + // 아이디 중복체크용 멤버 함수, 메소드 + public function id_exists($id) { + $sql = "SELECT * FROM member WHERE id=:id"; + $stmt = $this->conn->prepare($sql); + $stmt->bindParam(':id', $id); + $stmt->execute(); + + return $stmt->rowCount() ? true : false; + } +} diff --git a/config/phpMyAdmin.txt b/config/phpMyAdmin.txt new file mode 100644 index 0000000..4d0b568 --- /dev/null +++ b/config/phpMyAdmin.txt @@ -0,0 +1,15 @@ +CREATE TABLE `memsite`.`member` ( + `idx` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', + `name` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', + `email` VARCHAR(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', + `password` VARCHAR(100) NOT NULL DEFAULT '', + `zipcode` CHAR(5) NOT NULL DEFAULT '', + `addr1` VARCHAR(255) NOT NULL DEFAULT '', + `addr2` VARCHAR(255) NOT NULL DEFAULT '', + `photo` VARCHAR(100) NOT NULL DEFAULT '', + `create_at` DATETIME NULL, + `ip` VARCHAR(20) NOT NULL DEFAULT '', + PRIMARY KEY (`idx`), + UNIQUE (`id`) +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; diff --git a/dbtest.php b/dbtest.php new file mode 100644 index 0000000..a805fe1 --- /dev/null +++ b/dbtest.php @@ -0,0 +1,19 @@ +id_exists($id)) { + echo "ID '{$id}'는 이미 존재합니다."; +} else { + echo "ID '{$id}'는 사용 가능합니다."; +} diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..21939eb --- /dev/null +++ b/footer.php @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/header.php b/header.php new file mode 100644 index 0000000..1992f52 --- /dev/null +++ b/header.php @@ -0,0 +1,44 @@ + + + + + + + Document + + + + + + + +
+
+ + + + + Simple header + + +
\ No newline at end of file diff --git a/images/bootstrap-logo.png b/images/bootstrap-logo.png new file mode 100644 index 0000000..fd4eaff Binary files /dev/null and b/images/bootstrap-logo.png differ diff --git a/images/person.jpg b/images/person.jpg new file mode 100644 index 0000000..c6b3da3 Binary files /dev/null and b/images/person.jpg differ diff --git a/js/member.js b/js/member.js new file mode 100644 index 0000000..7944e0f --- /dev/null +++ b/js/member.js @@ -0,0 +1,25 @@ +document.addEventListener("DOMContentLoaded", () => { + + const btn_member = document.querySelector("#btn_member") + + btn_member.addEventListener("click", () => { + + const member_chk1 = document.querySelector("#member_chk1") + if(member_chk1.checked !== true) { + alert('회원약관에 동의해 주셔야 가입이 가능합니다.') + return false + } + + const member_chk2 = document.querySelector("#member_chk2") + if(member_chk2.checked !== true) { + alert('개인정보 취급방침에 동의해 주셔야 가입이 가능합니다.') + return false + } + + const f = document.stipulation_form + f.chk.value = 1 + f.submit() + + }) + +}) \ No newline at end of file diff --git a/member_input.php b/member_input.php new file mode 100644 index 0000000..97400c5 --- /dev/null +++ b/member_input.php @@ -0,0 +1,80 @@ + + // alert('약관에 동의하셔야 접근이 가능합니다.'); + // self.location.href='./stipulation.php'; + // "); +} + +include 'header.php'; + +?> + +
+

회원가입

+ +
+
+ + +
+ +
+ +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+
+ + +
+
+ +
+
+ 프로필 이미지 + +
+ profile image +
+ +
+ + +
+ +
+ + \ No newline at end of file diff --git a/stipulation.php b/stipulation.php new file mode 100644 index 0000000..2a66013 --- /dev/null +++ b/stipulation.php @@ -0,0 +1,38 @@ + + +
+

회원 약관 및 개인정보 취급방침 동의"

+

회원 약관

+ +
+ + +
+ +

개인정보 취급방침

+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + \ No newline at end of file