Page 1 of 1

Problem

Posted: Wed Nov 24, 2004 10:16 pm
by PHPMan
nigma | Help us, help you. Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Alright, I may have figured this out, but I did run into a problem...
What if I made a simple jpg, that had a blue background.
(one thing i dont know is, where to put the: img src=/the directory of image/) but this script should work for a captcha huh? 

Then put that on the index_content.php
Then just type in:

Code: Select all

<?php
<form action="validate.php" method="post">
 $captcha = new captcha(5, 'jpeg', 'ASDFGHJKL');
 $captcha = new captcha();
 $CaptchaString = $captcha->GetCaptchaString();
        //Check if userinput and CAPTCHA String are equal

        if ($_SESSION['CAPTCHAString'] == $_POST['captchastring'])
        {

          echo 'Validation Matches.';

        }
        else
        {

          echo 'Validation does not match.';

        }

      }
      else
      {

        echo 'Unknown target: ' . $goto;

      }

    ?>
nigma | Help us, help you. Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Wed Nov 24, 2004 10:43 pm
by nigma
This is the second post that you've put in the wrong forum. I realize you may not have read my reply to a previous post of yours in which you did the same thing but you're going to have to read our general posting guidelines before posting again. Failure to do so will result in the removal of future posts.