Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/12/2009, 05:14
Adria91
 
Fecha de Ingreso: diciembre-2009
Mensajes: 2
Antigüedad: 14 años, 5 meses
Puntos: 0
Ayuda porfavor

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 :)