Forums
This topic is locked
e-mailing form information
Posted 23 Jul 2007 05:23:18
1
has voted
23 Jul 2007 05:23:18 Sebastian Stant posted:
I am making a somewhat basic site, and the only thing i have left to do is finishing a form. I have made text fields and a submit button, however I do not know what I have to do so that when someone clicks submit, the information will be sent to me. I'm a beginner so easy to understand instructions would be greatly appreciated.Thanks
Replies
Replied 23 Jul 2007 21:09:02
23 Jul 2007 21:09:02 Alan C replied:
Hi
when your user clicks the submit button all the information in the form fields is sent to the server together with the names of the text fields. They go in pairs. What you need is something - a script - on the server to sort them out. There are many ways to go about this.
One - get a ready-written script like Formmail - a quick search will locate that. You install it, or you may find that it's already installed on your hosting package. It receives all the information from your form, does some checking and assembles it all into an email and sends it. Then it can redirect your user to a page that show them what you sent. My issue with this is that it's rather basic in its presentation, but it works and it works very well.
Next is to use something like Forms to go, that's a little application that you can download, there is a free version and a more-capable paid version. You literally drop your form file onto the forms to go icon and it generates php to check the form inputs and then send them. It's not quite as easy to set up as formmail, but it's a better result in the end and you can specify pages for where your visitors go on success or fail.
Finally, you can write your own - I guess from what you said that will not be your preferred action <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
My preference is forms to go, I use the free version, then hack the code myself to do just what I need.
Some other things to consider - you really should have some sort of checking on form data, how much depends on what you are going to do with it when it arrives. Think malicious people - by that I mean there are a lot of ******s out there who are going to attack your forms, especially if, for example, you're going to post the form input as comments. There are people who have written bots that go around posting comments on blogs that point back to their sites to increase their link popularity. Treat the input as suspicious at all times and you will not go far wrong. Even genuine users make mistakes in forms, like mistyping email addresses so you need to accommodate that by doing some error checking.
when your user clicks the submit button all the information in the form fields is sent to the server together with the names of the text fields. They go in pairs. What you need is something - a script - on the server to sort them out. There are many ways to go about this.
One - get a ready-written script like Formmail - a quick search will locate that. You install it, or you may find that it's already installed on your hosting package. It receives all the information from your form, does some checking and assembles it all into an email and sends it. Then it can redirect your user to a page that show them what you sent. My issue with this is that it's rather basic in its presentation, but it works and it works very well.
Next is to use something like Forms to go, that's a little application that you can download, there is a free version and a more-capable paid version. You literally drop your form file onto the forms to go icon and it generates php to check the form inputs and then send them. It's not quite as easy to set up as formmail, but it's a better result in the end and you can specify pages for where your visitors go on success or fail.
Finally, you can write your own - I guess from what you said that will not be your preferred action <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
My preference is forms to go, I use the free version, then hack the code myself to do just what I need.
Some other things to consider - you really should have some sort of checking on form data, how much depends on what you are going to do with it when it arrives. Think malicious people - by that I mean there are a lot of ******s out there who are going to attack your forms, especially if, for example, you're going to post the form input as comments. There are people who have written bots that go around posting comments on blogs that point back to their sites to increase their link popularity. Treat the input as suspicious at all times and you will not go far wrong. Even genuine users make mistakes in forms, like mistyping email addresses so you need to accommodate that by doing some error checking.
Replied 26 Jul 2007 17:34:50
26 Jul 2007 17:34:50 ball 420 replied:
do a search for a php scrpit there are thousands available online if you want i have one that i could share