Home > Software engineering >  how do i store and retrieve form data from a wesbite
how do i store and retrieve form data from a wesbite

Time:01-03

this is probably something i could have googled; however i thought id start getting more active on chat forums so basically...

I'm almost done with making a family members business website, on the website is an enquiry form; i want to know how i go making that form store the data its given and how i would then retrieve that data?

still doing final touches to the design then im going to start learning the process of deploying it live which is why im posting here to see how to go about it.

CodePudding user response:

To store data from an HTML form, you will need a server-side language and a database to save the data to. Some popular options for the server-side language include PHP, Java, and Python.

Once you have chosen a server-side language, you can use it to write code that will process the form data when the form is submitted. This typically involves connecting to a database, creating a table to store the data in, and then inserting the form data into the table.

To retrieve the data from the database, you will need to use a SQL query to fetch the data from the table. You can then use the server-side language to display the data on the website as needed.

It's a good idea to also consider security when handling form data. Make sure to validate and sanitize the form data to prevent any potential security vulnerabilities.

CodePudding user response:

It is very vast question, You will need an API to pass the data from Forms to API Server and a Database, that will store the data. It is also called client-server architecture.

Web Forms -> API Server -> Database

You can use either node express, java, python or any language to create API.

You can install the database on the server where you will run the API or you can use any from the cloud like AWS or Heroku, that way you will skip some setups and it will be ready to be used directly in the API.

  • Related