Im using smarty template engine and im trying to generate and image, which it happens but the thing is i need to pass a header for the image to view instead of the jibberish stuff. Any idea the image is suppose to load at the bottom of the page but my headers are already sent so i get an error that this image contains errors but if i run it like <img src="captcha.php" /> it will show. any idea
What's wrong with using captcha.php?
It doesn't matter what the src attribute has as long as the value (page in this case) is an image. PHP can do this by sending the [man]header[/man] with the appropriate image MIME type.