close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Captcha question

Thread began 9/16/2015 8:28 pm by elewis93815 | Last modified 11/23/2015 1:45 pm by Ray Borduin | 774 views | 9 replies |

elewis93815

Captcha question

I've attached Captcha to a contact form on a website and we are still getting several submissions that are in Chinese or are seemingly autofill junk. I've attached the files, I'm just curious to know if I've used it and added it correctly.

thanks,

Attached Files
WA Lerum.zip
Sign in to reply to this post

Ray BorduinWebAssist

No, it is not implemented correctly. You are simply validating that any value was entered into the form field. You should be using "Like Entry" validation and not just "Required" validation.

Then you can compare the entered value with the session variable: $_SESSION["captcha_Security_Code_1"] and make sure they are the same and not just that a value was entered like you are now.

Sign in to reply to this post

elewis93815

Hi Ray, I've updated the areas that you've instructed and it seems that it's still submitting even if I input just one letter in the captcha???? Thanks so much for your help!

Attached Files
WA Captcha.zip
Sign in to reply to this post

Ray BorduinWebAssist

You are comparing the $_POST value to the $_POST value... you need to compare the $_POST value to the $_SESSION value like I pointed out above.

The $_POST value will always be equal to itself, so yes it will submit no matter what is entered.

Sign in to reply to this post

elewis93815

I am still having issues with this. I guess maybe I'm not understanding where I'm going wrong?? Any assistance is greatly appreciated.

Attached Files
WA lerum.zip
Sign in to reply to this post

Ray BorduinWebAssist

I don't even see CAPTCHA in that form or server validation on that page? What page should I be looking at?

Sign in to reply to this post

elewis93815

So sorry. Here are the correct files.

Attached Files
WA Lerum Captcha.zip
Sign in to reply to this post

Ray BorduinWebAssist

Line 11 should be:

$WAFV_Errors .= WAValidateLE(strtolower(((isset($_SESSION["captcha_Security_Code_1"]))?$_SESSION["captcha_Security_Code_1"]:"")) . "",strtolower(((isset($_POST["Security_Code_1"]))?$_POST["Security_Code_1"]:"")) . "",true,1);

Sign in to reply to this post

elewis93815

Thanks for your help! I replaced the code as suggested. Where did I go wrong? In the server validation, I'm assuming I picked the incorrect values? Moving forward I would like to have a better understanding. Thanks again!

Sign in to reply to this post

Ray BorduinWebAssist

Yes, when you applied the server validation you compared the submitted form value to itself... which will always match.

You need to compare the value entered into the form element to the Session value stored by the CAPTCHA, which is what the updated code does.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...