Forums
This topic is locked
php form validate and mail
Posted 31 Mar 2007 04:20:29
1
has voted
31 Mar 2007 04:20:29 David Sutherland posted:
Part Ii use the popular FormMail cgi script to handle HMTL contact and
registration forms, so far all my html forms have no validation involved
Is there an quick'n'easy way to validate form data?
Part II
now joining the global shift towards php
wondering if there's a good PHP replacement for the CGI script
any suggestions for a reliable robust FormMail php script?
and php form validation process?
David Sutherland
Replies
Replied 31 Mar 2007 04:35:31
31 Mar 2007 04:35:31 Javier Castro replied:
I have used an open source application called PHP Formmail Generator. It works well, but 'm not sure if it also validates. It's been a while. Also, there is commercial one that I like it is "Forms To Go" fairly inexpensive, validates and the commercial version, creates scripts for asp, php, and html.
phpfmg.sourceforge.net/home.php
www.bebosoft.com/
Hope it helps.
phpfmg.sourceforge.net/home.php
www.bebosoft.com/
Hope it helps.
Replied 03 Apr 2007 18:36:16
03 Apr 2007 18:36:16 Alan C replied:
Formmail is fine, but the confirmation that the user sees is not very well formatted and it shows all the fields that were submitted.
I now use Forms to Go
Basically there is a free version and a premium version that you pay for, so take your pick.
In use you design your form, then drag and drop the file containing the form into a window, Forms to go then examines all the fields and offers you a choice of validation methods on each field, you also need to set up a success and failure page. Setting it up can be a bit fidley but not too bad. Once you have the php code for your page you can hack it around to suit your requirements too.
I have also taken to putting javascript on the page to check the form fields before they get submitted and when an email is being sent to me, I also have a CAPTCHA test in there.
I now use Forms to Go
Basically there is a free version and a premium version that you pay for, so take your pick.
In use you design your form, then drag and drop the file containing the form into a window, Forms to go then examines all the fields and offers you a choice of validation methods on each field, you also need to set up a success and failure page. Setting it up can be a bit fidley but not too bad. Once you have the php code for your page you can hack it around to suit your requirements too.
I have also taken to putting javascript on the page to check the form fields before they get submitted and when an email is being sent to me, I also have a CAPTCHA test in there.
Replied 15 Apr 2007 16:39:02
15 Apr 2007 16:39:02 Kenneth Halley replied:
Got any suggestions for an easy to use CAPTCHA- I have tried to do this myself but with limited success- there seem to be loads of CAPTCHAs out there but nothing simple and free! Just to validate simple contact forms.
cheers
Kenny
-----------------------------------
www.halleynet.co.uk
cheers
Kenny
-----------------------------------
www.halleynet.co.uk
Replied 16 Apr 2007 17:14:01
16 Apr 2007 17:14:01 Alan C replied:
yes - I have done a couple that I wrote myself - sounds rather grand for what they actually do !
The first is such a simple test - a question "What makes this sound - Mooo"
then three radio buttons: cow, bee, cat
when the data comes in look at the reply and check it. That is on a commercial site and has had no spam through the form.
The next is more complex, I show a thumbnail image, selected at random from 6 different images, put the image selection into the session, then when the data comes in look at the result, that is on a development site, you can look at it here, but please do not send any emails as you will see it only has test data in there at the moment - click the send email enquiry button and you will get the form - I will tidy up the layout too
www.lakesuk.com/index6.php
The first is such a simple test - a question "What makes this sound - Mooo"
then three radio buttons: cow, bee, cat
when the data comes in look at the reply and check it. That is on a commercial site and has had no spam through the form.
The next is more complex, I show a thumbnail image, selected at random from 6 different images, put the image selection into the session, then when the data comes in look at the result, that is on a development site, you can look at it here, but please do not send any emails as you will see it only has test data in there at the moment - click the send email enquiry button and you will get the form - I will tidy up the layout too
www.lakesuk.com/index6.php
Replied 16 Apr 2007 22:56:46
16 Apr 2007 22:56:46 Kenneth Halley replied:
lol
Actually thats quite clever, and simple.
Cool idea- I could do that- are you gonna patent it. lol
-----------------------------------
www.halleynet.co.uk
Actually thats quite clever, and simple.
Cool idea- I could do that- are you gonna patent it. lol
-----------------------------------
www.halleynet.co.uk
Replied 16 Apr 2007 23:09:14
16 Apr 2007 23:09:14 Kenneth Halley replied:
Actually- do you know there is a problem with your site the lakesuk one- in ie7 unless you open it in a vary large screen width your main content is floating off the page- seems OK in firefox- could be needing a margin instead of a width I suspect.
-----------------------------------
www.halleynet.co.uk
-----------------------------------
www.halleynet.co.uk
Replied 17 Apr 2007 17:59:23
17 Apr 2007 17:59:23 Alan C replied:
thanks for pointing that out - I always do the development in Firefox then go and check it later in IE.
Glad you like the idea - it was someone else on a team project who initially thought of it - the guy did not do php and needed something quick because one of his forms was getting spammed, so he came up with the animal noises idea
Glad you like the idea - it was someone else on a team project who initially thought of it - the guy did not do php and needed something quick because one of his forms was getting spammed, so he came up with the animal noises idea