
이 글은 2026년 04월 22일 작성된 글입니다.
오늘은 회원 기능(가입/로그인/로그아웃/세션)과
MySQL 기초 및 SQL 실행 흐름을 정리했다.
회원가입 폼에서 전달된 데이터를 처리하고,
유효성 검증을 추가했다.
<form method="POST">
<input type="text" name="username">
<input type="password" name="password">
<button type="submit">로그인</button>
</form>
session.setAttribute("loginedMemberId", memberId);
session.removeAttribute("loginedMemberId");
boolean isLogined = session.getAttribute("loginedMemberId") != null;
CREATE TABLE article (
title VARCHAR(100),
`body` TEXT
);
INSERT INTO article
SET title = '제목',
`body` = '내용';
SELECT * FROM article;