diff --git a/config/member.php b/config/member.php index 4d57145..bf2c54f 100644 --- a/config/member.php +++ b/config/member.php @@ -28,4 +28,22 @@ class Member { return $stmt->rowCount() ? true : false; } + + // 회원 정보 입력 + public function input($marr) { + $sql = "INSERT INTO member(id, password, name, email, zipcode, addr1, addr2, photo, create_at, ip) VALUES (:id, :password, :name, :email, :zipcode, :addr1, :addr2, :photo, NOW(), :ip)"; + $stmt = $this->conn->prepare($sql); + $stmt->bindParam(':id', $marr['id']); + $stmt->bindParam(':password', $marr['password']); + $stmt->bindParam(':name', $marr['name']); + $stmt->bindParam(':email', $marr['email']); + $stmt->bindParam(':zipcode', $marr['zipcode']); + $stmt->bindParam(':addr1', $marr['addr1']); + $stmt->bindParam(':addr2', $marr['addr2']); + $stmt->bindParam(':photo', $marr['photo']); + $stmt->bindParam(':ip', $_SERVER['REMOTE_ADDR']); + + $stmt->execute(); + + } } diff --git a/data/profile/test01.jpg b/data/profile/test01.jpg new file mode 100644 index 0000000..ebdb7a4 Binary files /dev/null and b/data/profile/test01.jpg differ diff --git a/header.php b/header.php index 0606322..7f21da5 100644 --- a/header.php +++ b/header.php @@ -4,7 +4,7 @@ - Document + <?= $g_title ?>