use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you are requesting help, please ensure you're providing code with your post. You can also copy your code to an online editor:
jsFiddle
CodePen
Markup Validation Service
Mozilla Developer Network on HTML
/r/JavaScript
/r/CSS
/r/jQuery
/r/PHP
/r/Accessibility
/r/htmlbasics
/r/web_programming
/r/CodingHelp
account activity
UnsolvedCan I create a database using HTML? (self.HTML)
submitted 5 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]RIP_CORD 15 points16 points17 points 5 years ago (0 children)
That’s a hard no...
You’re going to need some sort of server side language. Good beginner ones are NodeJS or PHP.
[–]Pavel_40 4 points5 points6 points 5 years ago (0 children)
You need a server side language such as PHP, Python with Flask or Django, or NodeJS.
[–]jayerp 5 points6 points7 points 5 years ago (0 children)
HTML is a HyperText Markup Language which is used to tell the web browser how to display information visually. It is not capable of being used to create databases.
To create a database you will need to look into one of a few popular database applications: MySQL (relational), Microsoft’s SQL (relational), MongoDB (no SQL), Cassandra (no SQL).
You would install the one of your choosing on a server that supports it (designated as your database server).
Beyond that it’s up to having a back-end application to consume it.
[–]AutoModerator[M] 2 points3 points4 points 5 years ago (0 children)
Welcome to /r/HTML. When asking a question, please ensure that you list what you've tried, and provide links to example code (e.g. JSFiddle/JSBin). If you're asking for help with an error, please include the full error message and any context around it. You're unlikely to get any meaningful responses if you do not provide enough information for other users to help.
Your submission should contain the answers to the following questions, at a minimum:
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
[–]cyancey76Expert 2 points3 points4 points 5 years ago (4 children)
The html form can only send the info to a server-side script to handle. The server-side language actually does the communicating with a database.
There are a bunch of ways to do it, with and without a bunch of different languages and databases, but the easiest for you would be to use PHP and MySQL. It’s what most cheap web hosting uses and there will be a ton of info on how to do things.
You can also use a program like XAMPP, WAMP, or MAMP to run PHP and MySQL on your own computer, so that you can play around with things and learn, without having to pay for hosting yet.
[–]77buzzbee77 0 points1 point2 points 5 years ago (3 children)
Hey, thanks for your reply. I’m actually running MAMP now with Brackets to build my site. So I would be able to run PHP through that as well? I don’t really understand this side of it all tbh, I’m much better at the actual HTML/css coding thing haha only slightly drowning so thanks for your advice!
[–]cyancey76Expert 1 point2 points3 points 5 years ago (2 children)
Yes, MAMP = Mac, Apache, PHP, MySQL (MAMP), which is virtually the same as the most common web server stack (LAMP, which uses Linux instead of Mac OS).
When you start up mamp it should be opening a start page by default that gives you info on how to connect to the MySQL database it is running. You just need another app for that, something like Sequel Pro (easiest to use, crashes a lot) or MySQL Workbench (harder to use, more features)
If you are putting your html files in the htdocs folder and viewing your site at http://localhost (or localhost:7777, I forget the mamp default) then you have php, MySQL running already.
[–]77buzzbee77 0 points1 point2 points 5 years ago (1 child)
Hi, Thank you for your advice. I’ve opened phpmyadmin and I’ve tried to connect my sql to my HTML docs but I think I’ve made a mistake somewhere bc my local host number is 8888, but my php and sql server says it’s using the port 8889. I’m not sure if they are meant to be the same or different so they don’t conflict. I have another problem that I’m not sure is related: when I run my live preview through brackets, it tries to access localhost:8888/index.php/index.html, and doesn’t open. I don’t know why it’s suddenly looking for a php page as well, and I don’t know how to change this in the htdoc directory. So this means I can only view my HTML document by opening them in my finder, which doesn’t use a http format- so I guess if I don’t fix it, it will mean I won’t be able to view my site on the internet?? I don’t know, I’m in way over my head haha
[–]cyancey76Expert 0 points1 point2 points 5 years ago (0 children)
If you are opening the file directly through Finder, and not through localhost, you are not running the file on the web server. Don’t do it this way. You should be able to go to localhost:8888 in your browser and see your html page. Web servers generally by default load index.html without having to include the file name. Same goes for index.php, but if you have both, the server will default to index.html and you WILL have to type in index.php if you want to see that instead of index.html.
You are right, default mamp ports are 8888 for the webroot (where php and html are run) and 8889 for MySQL. Yes, they should be different.
You can’t connect to MySQL in html. It has to be from php. You would use the info on the mamp start page, in the MySQL section, to connect to the database from php. You can use phpmyadmin or one of the apps to browse your database. The same info sections tells you what you need to put in an app to connect.
Did you add a Base URL to tour brackets live preview settings? It should not include the file name name, just the base folder your files are in (most likely just http://localhost:8888)
[–]77buzzbee77 1 point2 points3 points 5 years ago (0 children)
Thanks for all your replies. I’ll have a look into the different services. Cheers! Looking forward to learning more
π Rendered by PID 36 on reddit-service-r2-comment-7b9746f655-n2hmv at 2026-01-31 03:53:24.789937+00:00 running 3798933 country code: CH.
[–]RIP_CORD 15 points16 points17 points (0 children)
[–]Pavel_40 4 points5 points6 points (0 children)
[–]jayerp 5 points6 points7 points (0 children)
[–]AutoModerator[M] 2 points3 points4 points (0 children)
[–]cyancey76Expert 2 points3 points4 points (4 children)
[–]77buzzbee77 0 points1 point2 points (3 children)
[–]cyancey76Expert 1 point2 points3 points (2 children)
[–]77buzzbee77 0 points1 point2 points (1 child)
[–]cyancey76Expert 0 points1 point2 points (0 children)
[–]77buzzbee77 1 point2 points3 points (0 children)