Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: captcha problem

  1. #1
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,043
    Thanks
    19
    Thanked 42 Times in 42 Posts

    captcha problem

    Code:
    PNG  ��� IHDR���~���-���[H��IDATx]r [Y�\<"; _DcTT8mDeDw)*1Mg0Fi   o YZT5�vkÂZ;mf?5Kiݙ;|[ƧIP@G[u#W#_g;KaQrUcU)EqG)p|]?y"wqUQZF:i V}ҧAZGW&eH8zOXgn-g$  ;[)*iSߕ?q6p|‡lղDтIi !)G SQ, GSxɣ'ί,΃7h+;T2ilyТ5t46mv4?{M� ⎚҄$?p|w]6\SP{ͷ:V{ |R^'VU=fߏjePޫ/%A3))g8|rwp\LS$#%0E@15Sf븃=G1LK8_gEsJDk8V+js=}ay4ަZ/fUSd:Fss $w }lgu 7-ysꢬ�fmE[B����IENDB`
    is the output i get from using captcha codes
    i removed the header() because i was getting errors headers already sent
    any ideas?

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Put it in a separate file with the headers, then call the file like an image? <img src="captchafile.php"> ?

  • #3
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,024
    Thanks
    2
    Thanked 314 Times in 306 Posts
    Edit: Basically says the same as above ^^

    To output an image on a web page, you must use a HTML <img tag for each image -
    Code:
    <img src="image_url" alt="" >
    The image_url must be either a relative or absolute url that results in the image being output, with its header. Something, like -
    Code:
    <img src="my_captcha_image.php" alt="" >
    You cannot send a header and image data in the middle of a web page, that is not how HTML works or how browsers work.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #4
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,043
    Thanks
    19
    Thanked 42 Times in 42 Posts
    but how would i get the string into a session?

  • #5
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,043
    Thanks
    19
    Thanked 42 Times in 42 Posts
    any help?
    need this whole project finished for friday im about half way threw

  • #6
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,024
    Thanks
    2
    Thanked 314 Times in 306 Posts
    You just posted code that did this in this thread - Image Validation for registering a new user
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #7
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,043
    Thanks
    19
    Thanked 42 Times in 42 Posts
    thanks for the help but i sorted it


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •