Build a survey or quiz website that saves answers, with AI

A customer survey, personality quiz or graded test that really stores answers: two prompts, the steps onto BrewInTH, reading answers in the console.
You want to ask customers how their visit went, build a fun quiz people play and share, or give a class a short test that collects answers. Most people start with Google Forms, and that works fine until the day you want your own branding, a score or result shown instantly, or the answers kept somewhere that is yours.
This guide shows how to build a survey or quiz website that saves every answer in a database with AI: how to shape the data, two prompts you can copy, how to put it online on BrewInTH, and how to read the answers from the console.
In short
📝 A site that collects answers needs an app plus a database; a plain HTML page cannot keep answers in one place
📝 Plan three parts: the answering page, the store for answers, and a password-protected admin page with a CSV export
📝 On BrewInTH you pick the database when creating the project, and the connection values are written for the app
📝 Incoming answers can be read in the Databases tab › Database browser, even before you build an admin page
📝 A fun quiz can go on the portal for free reach; customer surveys or anything with personal data should stay off
Survey, quiz or test: what's the difference?
All three ask questions and store answers. What differs is what the person answering gets back.
- A survey, such as customer satisfaction after a visit. The person gets nothing back; you get data to improve.
- A personality quiz, such as "Which coffee are you?". The player gets a result they want to share, which makes it good marketing.
- A graded test, such as a short class quiz. The site marks the answers and gives a score.
Knowing which one you are building makes the prompt clearer, and the AI gets the design right the first time.
Why you need a database
A site made only of HTML files (a static site) is fast and needs no server, but whatever a visitor types stays in that visitor's browser. You never see it. To gather everyone's answers in one place you need a server-side app that receives the answers and saves them in a database.

The data fits in a few tables:
- Questions: the text, the type (single choice, multiple choice, 1-5 rating, free text) and the order.
- Responses: one row per submission, with the time and only the details you really need about the person.
- Answers: one row per question, linked to the response and to the question.
You don't need to name the tables yourself. Tell the AI what you want and it will design them.
Prompt 1: a customer satisfaction survey
Copy it and change the shop name and the questions.
Build a customer satisfaction survey website for a coffee shop called Baan Doi Coffee.
Answer page (no sign-in)
- Six questions: rate taste, speed, service and cleanliness (1-5 stars),
how often do you visit (single choice), and suggestions (free text, optional)
- Works well on phones, big tap targets, done in under a minute
- After submitting, show a thank-you page; the same device cannot submit again within one day
- Do not ask for a name, phone number or email
Admin page (/admin)
- Protected by a password read from the environment variable ADMIN_PASSWORD
- Average score per question, answers per day, and the latest suggestions
- A button that exports every answer as a CSV that opens in Excel with Thai text intact
Technical
- Use PostgreSQL, read the connection from DATABASE_URL, create the tables if they do not exist
- Validate on the server and limit submissions per minute against spam
- Read every secret from environment variables, never hard-code them
When done, submit three test answers, check them on the admin page, then deploy to BrewInTH.
A shop can print the link as a QR code for each table or on every receipt.
Prompt 2: a personality quiz people want to share
Build a quiz website: "Which coffee are you?"
- 8 questions, 4 options each; every option adds points to one of four results:
espresso, latte, iced americano and Thai tea
- One question at a time, a progress bar, and a back button
- At the end, show the result with a short description and a share button that uses the
address of that result page (every result has its own page, e.g. /result/latte,
with og:title, og:description and og:image)
- Save only the chosen options and the result in the database; no personal data
- An /admin page (password from ADMIN_PASSWORD) with plays per day and the share of each result
Technical: PostgreSQL from DATABASE_URL, create the tables on first start.
Play until you have seen all four results, then deploy to BrewInTH.
The key detail is that each result has its own address. When someone shares it on LINE or Facebook, the preview shows that result's picture and text, and friends click through to play.
For a graded test, use the same shape and add: "keep the correct answers on the server only; never send them to the page". Otherwise anyone who views the page source sees the answer key.
Putting it on BrewInTH, step by step

1. Create the project with a database
In the console, choose Create project, give it a name, pick the technology (if unsure, choose Let the platform decide (recommended)) and choose PostgreSQL as the database. The platform creates the database and writes the connection values, such as DATABASE_URL, for your app.
2. Let the AI release the code
With a coding agent on your computer, such as Claude Code, Codex, Cursor or Windsurf, press Create the AI link and token (automatic) on the project page and paste the message into the agent's chat. It uploads, builds and publishes by itself.
With an ordinary chat AI that hands you files, use Upload & go live (still in BETA) to send a ZIP, or paste the code from the chat, into the project you created.
3. Set the admin password
Open the App settings tab, add ADMIN_PASSWORD with a hard-to-guess value, and release again. The app reads its settings when it starts, so a new value takes effect with the next release.
4. Submit test answers and check they arrive
Answer two or three times from your phone, then open the project's Databases tab. In the Database browser, pick a table on the left to see its rows 50 at a time, or open SQL and press Run SQL to count the answers:
SELECT count(*) FROM responses;
(Use the table name the AI chose.) The browser works with PostgreSQL, MySQL and MariaDB, runs one statement at a time and shows up to 200 rows. It is for checking; for daily summaries use the admin page the AI built.
5. Share the link
You can name the site once for free, for example bandoi-survey, which gives bandoi-survey.host.brewinth.net with HTTPS. Turn it into a QR code with any QR generator, or ask the AI to add a printable QR page to the admin area.
Should it go on the portal?
When you create a project there is an option, List this site on the brewInTH portal — free promotion, ticked by default. The site appears on portal.brewinth.com once it is live and the team has approved it.
- A fun quiz: leave it on. It is a free way for new people to find you, and a site shown on the portal is never put to sleep, so it opens quickly every time.
- A customer survey, a class test, or anything that collects personal data: untick it. You can change it later in the project's Portal tab.

Personal data
A survey that asks for names, phone numbers, emails or health details needs more care than a fun quiz. Simple rules:
- Ask only what you need. If you will not call back, don't ask for a phone number.
- Tell people what you collect, what it is for, and whom to contact to have it deleted. Ask the AI to put this text above the submit button.
- Protect the admin page with a password, and don't share that password in group chats.
This is general guidance, not legal advice. If you collect a lot of personal data, or sensitive data, talk to an expert.
Watch the video
▶ From creating a project to opening the site (1:30, in Thai)
Watch on YouTube
FAQ
Is the free plan enough?
It is enough to start and test. The free plan has one project and one database, and text answers take very little space. An app on the free plan sleeps after a long time without visitors, so the first person after that waits a moment while it wakes. For daily use with real customers, or to use your shop's own domain, paid plans start at Starter, ฿99 a month.
Can I make a plain HTML page that sends answers to Google Sheets instead?
You can, but it needs extra setup on the Google side and the data lives somewhere else. This guide keeps the answers in the project's own database: everything is in one place, you control who sees it, and scores or summaries are worked out on the server.
How do I stop repeat submissions or bots?
Ask the AI to limit submissions per minute, add a hidden trap field that people never see but bots fill in, and remember devices that have already answered. For a test where you need to know who answered, use an entry code or a sign-in instead.
Can I change the questions after people have answered?
Yes, but tell the AI: "never delete an old question; hide it and add new ones at the end". Old answers then stay linked to the question that was actually asked. Back up the data before any big change to the database structure.
How do I chart the answers in Excel?
Use the CSV export on the admin page you asked for in the prompt, then open the file in Excel or Google Sheets. If Thai text looks garbled, ask the AI to "add a BOM to the UTF-8 CSV file".
Summary
A survey or quiz that really collects answers needs an app and a database. Decide which kind you are building, write a clear prompt for both the answering page and the admin page, create a project with PostgreSQL on BrewInTH, let the AI release it, test it and check the data in the Databases tab, and only then share the link with real people.
Start your first project free →
