trouble with captcha php not loading text

Been following this tutorial:
http://technologytuto.com/862/build-a-contact-form-in-php-with-spam-protection-captcha-from-scratch/#comment-1858

Everything works fine except the captcha which shows only the black blank png but no numbers to copy and verify.

I have created a contact.php with my html and form in it.

Then created the captcha.php as directed.

The contact_us.php as directed except made mine separate php file in same directory as contact.php.

The corresponding styling.

The captcha is blank and if you leave verify input blank msg will be sent so useless with or without it.

ok heres whats wrong with it
did you make a captcha.php

and if you did
for the color lets change the color

like this
[php]
$bgcolor = imagecolorallocate($image, 255, 0, 0); //add red
[/php]

and now lets make the capcha

[php]
$code = rand(1000, 9999); //create a random
[/php]

because in that tutorial it messed up on that part of the code

it did this
[php]
//code color with RGB. $code = rand(1000, 9999); //create a random
//number between 1000 and 9999
[/php]

but do it like i put it you will get reuslts

aha! I couldn’t believe they had made a mistake with the color but 255 255 255 is white isn’t it? Anyway I’ve since gone on to a rather more complicated but packaged captcha called securimage which has voice recognition. But I will change the code for this one just to have satisfaction of seeing it work, thanks!

your welcome

Sponsor our Newsletter | Privacy Policy | Terms of Service