Connecting a database to Website

Sep 5, 2021
Reaction score
Good evening and hello everybody,

I have been learning Html, CSS and Javascript and how they work together to build a website. I keep trying to push myself with new challenges. I would like to take my website and add user input to a database. This could be such as login details, names and addresses.

I have been reading on the internet and watching YouTube videos but I keep going round in circles. How do I take the user input and add it to the database. I don't understand the flow.

Please can someone help me and point me in the right direction.

Thank you

Very confused noobie
Mar 3, 2021
Reaction score
You'll need a "backend" that receives the requests. This is jumping into the deep end but is a necessary next step. These can be written in many languages. Popular choices are Python, Perl, PHP, and JavaScript, and likely others. Since you're already learning JavaScript, it might be easier to use that for the backend, as well. Just search for "<language> web framework" and go from there.
Nov 13, 2020
Reaction score
I would not use frameworks for anything. First thing you need to do satdownready is to pick a database and the language your going to use to communicate with it. I suggest mySQL as the DB, it's the most popular, so it won't go away soon, and PHP as the server side language. You don't need to learn PHP just yet. You can find cookie cutter routines that you will use over and over again to do what you want.

On the user side you use <form action="nameOfYourServerSidePHPscript" > This and a 'submit' button <input type="submit" value="Submit"> does all the work for you. YourServerSidePHPscript needs to find the inputs the user gave, make sure they are OK(not an attack on your DB), and the store them or see if the log in is correct.

Give it a try and come back with your questions and your code.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Latest member

Latest Threads