forms - displaying php captcha image -


My captcha image is having a big problem displaying in my HTML form referenced below "captcaImageOutput.php" file fully Is opened in a browser (code for this too has been copied) but I get a broken image in web form?

// Edit - Added code / output for the captain. At the end of PHP, // appreciate the people who respond quickly to your !! :)

  // Code for HTML FORM & lt; Form Action = "CaptchaAutput.FPP" method = "Post" & gt; & Lt; Label = "verify" & gt; & Lt; H3 & gt; And finally, verify your person! & Lt; / H3 & gt; & Lt; / Label & gt; & Lt; Input type = "text" id = "verify" name = "verify" /> & Lt; Img src = "captchaImageOutput.php" /> & Lt; / Form & gt; // Code for PHP captcha image & lt ;? Php session_start (); $ _SESSION ['safe'] = rand (1000,9999); ? & Gt; & Lt; Img src = "captchaCode.php" /> & Lt; Br> // Code for captcha generation & lt ;? Php session_start (); Header ('content type: image / jpeg'); $ Text = $ _SESSION ['safe']; $ Font_ size = 20; $ Image_width = 110; $ Image_height = 35; $ Image = imagecreate ($ image_width, $ image_height); Imagecolorallocate ($ image, 255,255,255); $ Text_color = imagecolorallocate ($ image, 0,0,0); {$ X1 = Rand (1,100) for ($ I = 0; $ i & lt; 30; $ i ++); $ Y1 = RAND (1,100); $ X2 = RAND (1,100); $ Y2 = RAND (1,100); Imageline ($ image, $ x1, $ y1, $ x2, $ y2, $ text_color); Imagesetpixel ($ image, rand ()% $ image_width, rand ()% $ image_height, $ text_color); } Imagettftext ($ image, $ font_ size, 0,15,30, $ text_color, 'font.ttf', $ text); Imagejpeg ($ image); ? & Gt;  


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -