Triby el codigo que utilizo es el siguiente:
Código HTML:
Ver original
<?php
$valor1 = "";
$valor1 = rand(1,9);
$valor2 = "";
$valor2 = rand(1,9);
?>
<form method="post" action="" name="formulario" accept-charset="utf-8" enctype="multipart/form-data"> <table border="0" cellspacing="10" cellpadding="10" width="100%"> <td width="80" align="right" height="22">Nombre:
</td> <td width="290" align="left" height="22"><input type="text" name="nombre" id="nombre"></td> <td width="80" align="right" height="22">E-mail:
</td> <td width="290" align="left" height="22"><input type="text" name="email" id="email"></td> <td width="80" align="right" height="22"><?php echo $valor1 ?> +
<?php echo $valor2 ?> :
</td> <td width="290" align="left" height="22"><input type="text" name="sumatoria" id="sumatoria" size="5" maxlength="5"></td> <td width="100%" colspan="2"><input type="button" value=" Enviar " onclick="envio_contrasena_nueva(valor1 = <?php echo $valor1 ?>, valor2 =
<?php echo $valor2 ?>)">
<input type="reset" value=" Borrar "></td>