Results 1 to 1 of 1

Thread: Captcha Control

  1. #1
    Join Date
    Jul 2011
    Irish Republic

    Captcha Control

    Any direction would be great. Thanks in advance.

    I believe that the ($codeVal) has to be installed somewhere with the else if (md5($code) == $_SESSION['image_random_value']) to facilitate setting of the error. Having difficulty making progress with this aspect of the validation!

    Captcha control as follows from the validate.php:

    PHP Code:
            public function validateCode($codeVal$codeName) {
            if (
    strlen($codeVal) <= 0) {
    $this->setError($codeName"Enter Validate Code");            
            } else if (
    md5($code) == $_SESSION['image_random_value']) {        
    $this->setError($codeName"Valid Code Required");

    Captcha panel visible to visitor as follows from the contact.php:

    HTML Code:
    	    <legend>Validate Form  <span class="errors"><?php echo $codeErr ?></span></legend>
    		<span class="required">Required</span>
    	        <img src="randomImage.php" alt="Captcha Image"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="text" name="code" class="data"/>
    	        <!--Refresh Validate Code Button Facility-->				
    		<div id="flip"><a href onclick="history.go()" class="link" alt="Refresh Code" /></a></div>
    and it looks like the visitorView.jpg image attached.
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center