[Day 3] Building a Forum
![[Day 3] Building a Forum](/uploads/editor/3%EC%9D%BC%EC%B0%A8-%EA%B2%8C%EC%8B%9C%ED%8C%90-%EB%A7%8C%EB%93%A4%EA%B8%B0-4-1.webp)
Building a PHP Forum!
A forum is the ultimate test of any web application!
Write posts
View posts
See post listings
Edit posts
I wanted to implement these features but wasn't sure where to start.
Since this is my blog, I decided to build admin functionality for managing posts (or articles) after implementing login earlier.
The /admin/ folder contains:
adm_header.php
adm_footer.php
index.php (currently empty)
seo_list.php (view post listings)
seo_write.php (write/edit posts)
_auth.php (checks if user is admin)
Database Table Creation
CREATE TABLE `blogscore_board` (
`id` bigint UNSIGNED NOT NULL,
`user_id` bigint UNSIGNED DEFAULT NULL,
`category` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`summary` text COLLATE utf8mb4_unicode_ci,
`content` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`thumbnail` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`seo_title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`seo_description` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`seo_keywords` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`author` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT 'admin',
`hit` int UNSIGNED NOT NULL DEFAULT '0',
`is_publish` tinyint(1) NOT NULL DEFAULT '1',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;- seo_list.php
![[3일차] 게시판 만들기](/uploads/editor/3%EC%9D%BC%EC%B0%A8-%EA%B2%8C%EC%8B%9C%ED%8C%90-%EB%A7%8C%EB%93%A4%EA%B8%B0-4-1.webp)
- seo_write.php
![[3일차] 게시판 만들기](/uploads/editor/3%EC%9D%BC%EC%B0%A8-%EA%B2%8C%EC%8B%9C%ED%8C%90-%EB%A7%8C%EB%93%A4%EA%B8%B0-4-2.webp)
The biggest concern during this forum implementation was SEO (Search Engine Optimization).
I'll cover SEO in more detail in a future post.
I've written sample posts, and I'll discuss the view.php page and short domain slugs next time!
ps. I just realized I didn't implement file uploads while writing the posts... This will be added later! And should I create a calendar-based scheduler? I'm still thinking about it.
FAQ
What is a forum in web development?
A forum, or message board, is a website section where users can post messages and interact. In this case, it's being implemented as part of a blog platform.
Korean Source
This article is an English localization of a Korean-language report from BlogScore. Original: [3일차] 게시판 만들기