The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Form Validation Help..., Trying to stop spammers...
JohnDC
post Oct 20 2007, 03:26 PM
Post #1





Group: Members
Posts: 3
Joined: 20-October 07
Member No.: 4,105



Hello, this is my first post to this board. Thank you all for being here. Here is my question:

Within my html form, I would like to include a question that must be answered correctly in order for the form to be submitted. The purpose of the form is for musicians and artists to submit details of upcoming performances (venue name, date, time, etc.). Now since I've been getting a lot of spam through this, I've included the question of "Venue City?" Since my service only lists events in the city of Alexandria, VA, I want the field to only contain "Alexandria" to be successful. Other fields are also required, but not a specific entry. I've spent quite a few hours today searching Google for a solution with no luck. Keep in mind I'm not a professional programmer/coder. smile.gif Is there a solution? Thanks in advance. ~John

Here is the link to that form: http://www.alexandrialive.com/submit.html

Within the website: http://www.alexandrialive.com
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 20 2007, 04:25 PM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 17,511
Joined: 9-August 06
Member No.: 6



It looks like you use a script controlled by your host and not by you. Is that correct? You need to use a script that you can make changes to. unsure.gif
CODE
<FORM action="http://formmail.dreamhost.com/cgi-bin/formmail.cgi" method="post">


I move this to the Server-side Scripting forum. You have a better chance to get an answer there. smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Oct 20 2007, 04:29 PM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,245
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Please see the FAQ entry How can I require that fields be filled in, or filled in correctly?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
JohnDC
post Oct 22 2007, 09:57 AM
Post #4





Group: Members
Posts: 3
Joined: 20-October 07
Member No.: 4,105



QUOTE(Darin McGrew @ Oct 20 2007, 05:29 PM) *


Thanks for that link, but that was one of the sites I looked at before posting this message. That page didn't help at all (as a novice programmer). I've also read about email validation too, but this is different. I was able to impliment a warning about not filling in the correct city name - but since the hidden input field only check to see if the entry was completed - it sends the form anyway after warning me about the wrong city name. What I need is something that check to see if and entry is valid first before checking to see if it's just completed - or at the same time.

Thanks for any help. I'm googled out. ~John
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Oct 22 2007, 11:13 AM
Post #5


WDG Member
********

Group: Root Admin
Posts: 8,245
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



You need to update your formmail.cgi script, or get another script that does what you want it to do.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
JohnDC
post Oct 22 2007, 12:18 PM
Post #6





Group: Members
Posts: 3
Joined: 20-October 07
Member No.: 4,105



Thanks again Darin, now I'm getting somewhere. I also got this reply from my server's support team: Thanks for your guideance. I'm going to look for a new script now.

"Well it appears that your using our form mail script. That form doesn't
have any checking system built into it. The only thing you can do is set
that field to required and then it will reject the form if that is blank,
but it will not check to see if it was actually Alexandria.

Since our form mail script doesn't have that capability you would really
have to setup your own form mail script. Your custom form mail script
could then require that field have the input that you want.

I'm sure there are form mail scripts out there that would do this, or
would use a captcha or some other spam prevention system, though I don't
really have one I can recommend.

With some PHP knowledge you could build one yourself.
http://wiki.dreamhost.com/PHP_mail()
http://wiki.dreamhost.com/PHP_Form_Processing"
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Oct 22 2007, 03:07 PM
Post #7


Jocular coder
********

Group: Members
Posts: 2,298
Joined: 31-August 06
Member No.: 43



QUOTE
Thanks again Darin, now I'm getting somewhere. I also got this reply from my server's support team: Thanks for your guideance. I'm going to look for a new script now.


Their reply isn't entirely the most helpful. Can't you make a copy of their script and simply add the check, instead of having to start again? (This incidentally is the point of (speech-)free software.) Writing a demonstration emailing script is very easy indeed, but making one that can't easily be used for spamming is a lot harder.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th March 2017 - 08:35 PM