Hello,
I have a chaptcha code for my form, and its not working. all it does is output five black boxes. below are the codes i use
This is verification.php
PHP Code:
and this is what i put in the form
PHP Code:
I have a chaptcha code for my form, and its not working. all it does is output five black boxes. below are the codes i use
This is verification.php
PHP Code:
| Quote: |
| <?php
header("Content-type: image/jpeg"); $im = imagecreate(12,16); $white = imagecolorallocate($im,255,255,255); $black = imagecolorallocate($im,0,0,0); $new_string = $_GET[code]; $new_string = substr($new_string,17,6); $new_string = $new_string[$_GET[p]]; imagefill($im,0,0,$black); imagestring($im,3,3,1,$new_string,$white); imagejpeg($im); imagedestroy($im); ?> |
and this is what i put in the form
PHP Code:
| Quote: |
| <fieldset>
<legend>Image Verification</legend> <?php for ( $p = 0; $p <= 5; $p++ ) { echo "<img src='script/verification.php?code=$v&p=$p'>"; } ?> <input type="text" name="verification" size="16" maxlength="6" class="form"><br> </fieldset> |
