You are on page 1of 2

<!

DOCTYPE html>
<html>
<head>
<title>Formulario</title>
</head>
<body>

<br>

<br>
<br>

<?php

$enviado=false;
$txt_num=NULL;
$txt_num1=NULL;

if(isset($_POST["Calcu"])){
$enviado=true;
$txt_num=$_POST["numero"];
$txt_num1=$_POST["numero"];
}
?>

<form method="POST" action="">


<label>Ingrese numero</label><br>

<input type="number" name="numero" value="<?php echo $txt_num;?>"><br>


<input type="submit" value="Calcular" name="Calcu">
</form>

<form method="POST" action="">


<label1>Ingrese numero2</label1><br>

<input type="number" name="numero" value="<?php echo $txt_num;?>"><br>


<input type="submit" value="Calcular" name="Calcu">
</form>

<?php

if($enviado){

if($txt_num==NULL ) {
echo "Por favor introduce un numero<br>";
}

if ($txt_num >==100){

echo "el numero es mayor";


}else{
echo "el numero menor ";
}?>

</body>
</html>

You might also like