Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
PHPMan
Forum Newbie
Posts: 13
Joined: Thu Nov 18, 2004 8:47 am

Problem

Post 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]
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post 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.
Post Reply