Buenas, aqui os traigo mi primer intento de hacer un programita para aprender PHP..
Es una chorrada, subo el codigo haber si alguien me puede ayudar. Pues no me hace la funcion que quiero.
COnsta de un formulario en html y el programita en PHP..
Código:
<html>
<body>
<h1> Prueva PHP</h1>
<form method=get action="calcula.php">
Posa el <b>Primer</b> numero
<input name="num1" type="text">
<br>
Posa el <b>Segundo</b> numero
<input name="num2" type="text">
<br>
<br>
<input type=submit>
</form>
</body>
</html>
Y aqui el de PHP
Código:
<html>
<head>
<title>Proves</title>
</head>
<body bgcolor =green>
<font color=white>
<h2>
<?php
$suma = $num1 + $num2 ;
if ($suma > 236) {
echo "$suma es mas grande que 236" ;
} else {
echo "$suma es mas pequeño que 236" ;
}
?>
</h2>
</font>
</body>
</html>
Gracias por la atención :)