# CAPTCHA validation HELP

**URL:** <https://forum.kirupa.com/t/captcha-validation-help/264224>\
**Category:** programming\
**Created:** [June 24, 2008, 7:33am UTC](https://forum.kirupa.com/t/captcha-validation-help/264224 "2008-06-24T07:33:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jon\_d](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jon\_d](https://forum.kirupa.com/u/jon_d)\
**Post date:** [June 24, 2008, 7:33am UTC](https://forum.kirupa.com/t/captcha-validation-help/264224/1 "2008-06-24T07:33:29Z")

</div>

Hi all,

I have tried using this CAPTCHA Validation PHP script

> **[Creating a PHP Captcha](http://www.ebrueggeman.com/blog/creating-a-php-captcha)**
>
> Captchas are images that are meant to tell the difference between a person and a computer. They are often used as an anti-spam device when someone submits content to a public website. Because a comput

I have created the CAPTCHA alright, but it seems that no matter what letters I enter (wrong or right) the form can be submitted.

I have also tried to embed my thankyou.php (after the form has been sent) with the VALIDATION script he gives (attached below), but it doesn’t help - forms get sent no matter what i do.

My site is in hebrew, so it may be difficult for u to eatch the source, but I **am desperate for help!** BOTs are constantly psamming me with my forms…

[http://www.paripassu.co.il/form2.htm](http://www.paripassu.co.il/form2.htm) - the form  
[http://www.paripassu.co.il/thankyou.php](http://www.paripassu.co.il/thankyou.php) - the thankyou page

(please note that i am using YAV verification also - but chose to implement a different CAPTCHA - since yave2.0 does not show how to acctually make the cpatcha… can this be the problem?)

THX  
Jon

```php

<?php
session_start();$user_content=trim($_POST['user_content']);$user_captcha_input=trim($_POST['user_captcha_input']);if(isset($_SESSION['encoded_captcha'])){ if($_SESSION['encoded_captcha'] == md5($user_captcha_input)) { //..THE USER IS TRUSTED, STORE THEIR CONTENT } else { //THE USER ENTERED THE WRONG CAPTCHA //DISPLAY AN ERROR MESSAGE }}
?>

```

---

<div class="post-metadata">

**Author:** ![borrob](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@borrob](https://forum.kirupa.com/u/borrob)\
**Post date:** [June 24, 2008, 9:13am UTC](https://forum.kirupa.com/t/captcha-validation-help/264224/2 "2008-06-24T09:13:10Z")

</div>

hi i tried to understand the page you wrote but i’m having a problem finding the function:  
onsubmit="checkOnSubmit(‘form’, rules);

i cannot find the definition for the function checkOnSubmit

---

<div class="post-metadata">

**Author:** ![jon\_d](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jon\_d](https://forum.kirupa.com/u/jon_d)\
**Post date:** [June 25, 2008, 7:11am UTC](https://forum.kirupa.com/t/captcha-validation-help/264224/3 "2008-06-25T07:11:30Z")

</div>

This is the YAV 2.0 Java Script - my form vaildation tool  
it shouldn’t be the problem…

[http://yav.sourceforge.net](http://yav.sourceforge.net)

---

<div class="post-metadata">

**Author:** ![borrob](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@borrob](https://forum.kirupa.com/u/borrob)\
**Post date:** [June 25, 2008, 9:12am UTC](https://forum.kirupa.com/t/captcha-validation-help/264224/4 "2008-06-25T09:12:20Z")

</div>

there is a problem here  
your code:  
onsubmit="return onsubmit=“checkOnSubmit(‘form’, rules);return false;”\>

from [http://yav.sourceforge.net](http://yav.sourceforge.net):  
onsubmit=“return performCheck(‘formName’, rules, ‘classic’);”\>

---

<div class="post-metadata">

**Author:** ![jon\_d](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jon\_d](https://forum.kirupa.com/u/jon_d)\
**Post date:** [June 28, 2008, 8:18pm UTC](https://forum.kirupa.com/t/captcha-validation-help/264224/5 "2008-06-28T20:18:03Z")

</div>

ok, thx - but since the CAPTCHA is non-YAv related - this is the problems… the form is still go even when i put the wrong code…  
I have also tried uploading it in PHP [http://www.paripassu.co.il/form2.php](http://www.paripassu.co.il/form2.php)

Any other toughts?

---

<div class="post-metadata">

**Author:** ![jon\_d](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jon\_d](https://forum.kirupa.com/u/jon_d)\
**Post date:** [July 2, 2008, 4:32pm UTC](https://forum.kirupa.com/t/captcha-validation-help/264224/6 "2008-07-02T16:32:10Z")

</div>

anybody??? help …
