jl9148 Posted October 27, 2006 Share Posted October 27, 2006 hey, i have a memberscript and when users register, i want them to enter in a captcha code.the script already comes with that but its not working. below is the code...[i]verification.php[/i][code]<?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); ?>[/code]and here is what i put into the registration page...[code]<fieldset><legend>Image Verification</legend><table cellpadding="0" cellspacing="0" class="main"><tr><?phpfor ( $p = 0; $p <= 5; $p++ ) {echo "<td><img src='$script_location/verification.php?code=$v&p=$p'></td>";echo "<td width='5'></td>";}?><td><input type="text" name="verification" size="16" maxlength="6" class="form"></td></tr></table></fieldset>[/code]whenever i try to do that, all that shows up is 5 black blocks..help anyone? thanks[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.