This code does work although I am having trouble getting it to post
properly when using the Security Component. Anyway, the post issue is
low priority for me right now.

In view:
<?php if ( $useCaptcha ){ ?>
        <label>Security Code: (refresh for new code)</label>
        <?php echo $form->input('Temp.captcha', array('size' => '20')) ?>
        <img src="<?php echo $html->url('/users/captcha'); ?>" />
<?php } ?>

In users_controller:
function captcha(){
...
/* output captcha image to browser */
        header('Content-Type: image/jpeg');
        imagejpeg($image);
        imagedestroy($image);

}

Gary Dalton


On 10/14/07, MikeK <[EMAIL PROTECTED]> wrote:
>
>
> I am still struggling with this dadgumit -- there is nothing wrong
> with the img generated itself -- I just can't emit it without saving
> it to a file with the Header command if anything else is on the page.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to