Reputation: 1
I want to build a form within html to ask for user contact info. Do I absolutely need a database to store & retrieve that data (user contact info)? How do I do that?
Upvotes: 0
Views: 5640
Reputation: 55
One of the solutions might be the use of third-party services to handle the contact data like formspree.io.
<form action="http://formspree.io/[email protected]" method="post">
<input type="name" name="name">
<input type="email" name="_replyto">
<textarea name="body"></textarea>
<input type="submit" value="Submit">
Include the above code on your contact web page. Change [email protected] with your own email address. Include a name-attribute in all form elements as required to receive the submission data.
Configuration is easy. Submit a form once from the production environment. Reply to the configuration email ASAP and you are all set.
Check out the following article:
Upvotes: 0
Reputation: 345
Check www.enformed.io, you don't need a database to manage your contact forms. And also has a couple of interesting features, like setting the redirect after submiting, and email customization. Works great to me.
Upvotes: 3
Reputation: 10824
A database is an organized collection of data. You have few options:
All of the above are databases, some are simple and will give you a hard time retrieving your data later.
In all of the above you'll need a server side application/script that will handle the saving operation.
Upvotes: 0
Reputation: 2149
Do I absolutely need a database to store & retrieve that data (user contact info)?
Yes, and no. If you want to store data on a server, and retrieve that data from the server, then yes (of course you can store it in JSON or CSV, which gives you less power but is much simpler). This option gives you much more control over the data, and you can do things like:
But if you simply want to store certain information for a user's session, then you can use cookies or session storage.
How do I do that?
That part's more complicated. If you want to store data in a database, then you can use one of the dozens of DB systems out there, such as MySQL, MongoDB, PostgreSQL, etc. Another option is Firebase which allows you to store your data on secure, external servers, and access that data on the client side.
You'll also need some sort of server-side framework, such as PHP, Django, Rails, or Node.
Upvotes: 1
Reputation: 41
No you don't.
But you have to use a server side technology as php to send you the data by email or any other way. The database is just a way to store the data.
Upvotes: 2
Reputation: 49
Yes you need to have a database to store and retrieve that data, it all depends upon the number of users you have if you have many users who use that form than I guess you need to save them in a database.
http://www.w3schools.com/html/html_forms.asp
Upvotes: -1