(I would like to eventually create a database and store the details directly in some tables- suggest some ideas on how I can do that also).
2) You'll need a way to collect the data from the HTML Form on the server, and that means you'll need to pick a server side language: .NET, Java, PhP - take your pick. You'll typically find somewhat consistent conventions, at least with dealing with HTML requests, but in this case the most important one is an object that represents the user's request. What you want to do is read the parameters from the user request. For example, if you have a form field with a name of "guest_name", then you would want to read out the "guest_name" parameter.
3) You'll need a place to save the collected data. Here I recommend you poke around for example code on whatever language you are using and whatever database you are using. It's only a google away: for instance: ASP.NET SQL Example, or PhP MySql Example.
After you get through all three steps, you should have a better understanding of how the pieces fit together. But, before you throw anything out onto the web, be sure to do a little research on form validation, sql injection, and script injection (aka cross-site scripting) to make sure you're not opening up any security hole.
Thanks Steve. But right now I do not want to set up a database or use any server side language. All I want is capture the information that I collect from the forms ( gues form and contact us form) which should be emailed to me in proper format directly. Can I do it by just using HTML?
Oh... in that case what is the simplest way to do it? Java scares me to death. Can you please suggest the simplest way possible?
Thanks in advance,
posted 15 years ago
Thanks. Can I do without a database at all? All I want is to be able to send the form information to be emailed.I do not want it to be saved anywhere.
Thanks a lot for your time.
posted 15 years ago
Can somebody please suggest a website or a tutorial where I can pick up the stuff I need for this? I understood that I do not need all my other pages to be in jsps and can leave them as HTMLs. I am planning to change the two htmls (guest and contact forms) to jsps. I would like to know how I can avoid a database setup. I really appreciate if someone can show me preferably with an example how the values from the form can be saved to a temperary file from which the values whould be extracted and send by email. Do I need another technology to send an email ?
posted 15 years ago
I am changing the HTMLs to JSPs. I only need to now know how I can send the form information in an emal. Appreciate if someone can point me in the right direction.
You do not need to change the HTML pages that contain the forms to JSPs. That will serve no purpose at all.
What you need is a server-side component that these forms will submit to that will perform the email processing for you. No database necessary just to send emails.
If you decide to use Java and a servlet engine, then a servlet that uses the JavaMail API is what you need.
If you'd like to avoid Java -- which for sending a simple mail message is quite a bit of overkill -- you can use any other server-side technology: CGI with Perl, for example. I'm willing to bet there are hundreds, if not thousands, of such Perl scripts floating around the net.
If you want to get a database involved, then servlets with JDBC is what I'd recommend, though there are other alternatives depending upon what technologies you want to get involved with. [ November 28, 2005: Message edited by: Bear Bibeault ]
Thanks very much Bear. I will learn the language soon but for now if I need not use java I don't want to use it. No database either.
Here is what I understand. I will only need a perl script on the server side to which I will submit my forms which will then compose an email with the form data and send the email. I do not need any java to do that.