Thursday, July 30, 2009

I need a tutorial on how to create forms and save data on my website?

I've looked on google, but no luck. I assume I need to setup a "mysql" database, then use some kind of script program. I need a tutorial that explains this specific process step by step. I am a c++ programmer, so it won't be too hard for me to understand.

I need a tutorial on how to create forms and save data on my website?
There is no need for any database on the server side. You can write form data to a flat file if need be.





When a user submits form data the data is transmitted to the program referred to in the form. There are two types of methods GET and POST. The form data is made available to your program differently for each method but there are plenty of libraries for plenty of languages to abstract and hide the low level details (one method I know makes the data available by setting environment variables and you refer to the name of the environment variable which is the same as the form field name).





Once your server side program reads the data in you can pretty much do whatever you want with the data. Process it, store it to a database, write it out to a file, format it in and send it as an e-mail, etc. You are limited by what your host makes available.





Most inexpensive hosting services provide MySQL and/or Postgress relational database servers, so that is a logical choice.





However, never ever neglect security. Thoroughly scrub and edit the input data before using or storing it. If you are expecting a field to be a number between 1 and 12 make sure it is a two digit number between one and 12 and not letters, not SQL commands, not HTML commands, not a string of digits 12,218 bytes long followed by system commands, etc.





A good term to start searching with is "CGI".
Reply:Yes, you first need to pick out a database. I really enjoy working with mySQL. Then you should try php for your webpages. This is great stuff, and I use it on all of my dynamic sites. But basically php is a server side scripting language, so you can import/export info with this.





-3xpl0it


My pc help site: http://www.pchelphq.com

flowers on line

No comments:

Post a Comment