php code is commented on in html

4

I'm creating a captcha in a registration form, and I'm calling the image with a php command, but the captcha image does not appear on the form, and when I enter the browser console the php code is commented out.

Code in the editor looks like this:

<?php require_once('imagem_seguranca.php'); ?>

And in the console appears commented like this:

<!--<?php require_once('imagem_seguranca.php'); ?>-->

Archive code 'image-security.php'

<?php $imagem = mt_rand(0,4);?>
<img src="captcha.php?iu=<?php echo $imagem; ?>" />
    
asked by anonymous 08.09.2015 / 18:10

1 answer

2

A file that pulls another file that pulls the image ...

Do it once.

Where you want to put the captcha, do:

<img src="captcha.php?iu=<?php echo mt_rand(0,4); ?>" />

    
08.09.2015 / 19:13