angelopaolo.gs Posted June 10, 2009 Report Share Posted June 10, 2009 ya toy en xammp y tngo este codigo y no funka xD el html <html> <body> <form method="post" action="triangulo.php"> BASE<input type="text" name="base"> <br> ALTURA<input type="text" name="altura"> <p> <input type="Submit" name="Submit" value="Calcular"> </form> </body> </html> y el php <html> <body> <?php $base ; $altura; $area = ($base*$altura)/2; printf("area del triangulo es: $area"); ?> </tml> </body> kien me korrige porfa :D Link to comment Share on other sites More sharing options...
tomy321 Posted June 11, 2009 Report Share Posted June 11, 2009 (edited) Probado y funcionando :D HTML <html> <body> <form method="post" action="areatriangulox.php"> BASE: <input type="text" name="base" id="base"> <p>ALTURA: <input type="text" name="altura" id="altura"> <p> <input type="Submit" name="Submit" value="Calcular"> </form> </body> </html> PHP <?php $base = $_POST['base']; $altura = $_POST['altura']; $area = ($base * $altura)/2; echo "area del triangulo es: $area"; ?> SALUDOS! Edited June 11, 2009 by tomy321 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now