How do you create a forum? what languages do you need?
There are many sites that make it for you like:
http://www.simplemachines.org
but just wanted to know how you would do it yourself, is it using php?
thank you for any input
How do you create a forum? what languages do you need?
There are many sites that make it for you like:
http://www.simplemachines.org
but just wanted to know how you would do it yourself, is it using php?
thank you for any input
A forum breaks down into a few clear responsibilities: a data model for users/threads/posts, who can do what (auth and permissions), how content is created and rendered safely, and how the site is operated and scaled. asked about languages and and started the discussion — the practical path below focuses on the work to be done rather than a single language choice.
Start with an MVP data model and flow. Keep schema simple and index the fields you query most often (thread id, timestamps, user id). Example minimal schema:
CREATE TABLE users (id SERIAL PRIMARY KEY, username VARCHAR(50) UNIQUE, email VARCHAR(255) UNIQUE, password_hash VARCHAR(255), created_at TIMESTAMP);
CREATE TABLE threads (id SERIAL PRIMARY KEY, title VARCHAR(255), user_id INTEGER, created_at TIMESTAMP, last_post_at TIMESTAMP);
CREATE TABLE posts (id SERIAL PRIMARY KEY, thread_id INTEGER, user_id INTEGER, content TEXT, created_at TIMESTAMP, edited_at TIMESTAMP); Build: signup/login, create thread, reply, list threads with pagination, view single thread. Add notifications, attachments, and search later.
Security and reliability are the most common gotchas. Use strong password hashing (see Argon2 guidance), parameterized queries to avoid injection, escape or sanitize user content on output (store raw text/markdown; sanitize when rendering), use CSRF tokens, secure cookies and HTTPS, and implement rate limits/anti-spam. Good references: OWASP Top Ten (https://owasp.org/www-project-top-ten/) and OWASP Password Storage Cheat Sheet (https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html). For client-side interaction, modern browsers use fetch/XHR or WebSockets to call your server APIs (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch).
Ship iteratively: get a working posting flow, then add moderation roles, search, caching, background jobs for email/notifications, backups, and monitoring. Prioritize safety (XSS/SQLi), then performance and features. For a first build, pick tools you already know and focus on correctness; add polish and scale later.
Jump to Post— itsjareds 29As with many things in programming, there is more than one way to do something. You could pretty much use any server-side language with any database (or text file if you're cheap).
Basically all you need to do is make a server-side script (you don't have to use PHP, …
Jump to Post— itsjareds 29This forum was made using PHP since in the copyright information at the bottom, it says "Powered by vBulletin". That's a PHP-powered board.
As with many things in programming, there is more than one way to do something. You could pretty much use any server-side language with any database (or text file if you're cheap).
Basically all you need to do is make a server-side script (you don't have to use PHP, but it's not a bad idea) that draws posts and topics from the database, then print it on the screen. It's not as complex as it sounds but there is a lot that goes into making the page look nice, making your forum multi-lingual, and keeping it quick at runtime.
twoum + twoum
Runs away, giggling
itsjareds
thanks for that, initially i assumed it would be client side because in a forum you can see the results straight away. I am just learning asp so need to start learning php etc
What languages do you thikn was used to make this forum? sorry i can't tell lol
This forum was made using PHP since in the copyright information at the bottom, it says "Powered by vBulletin". That's a PHP-powered board.
client side javascript can't interact with servers at all. You need php and mysql to make a form that stores the entered text in a database and can also retrieve and display it.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.