Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- h1{
- text-align: center;
- }
- table{
- background-color:#FFC;
- padding:5px;
- border:#666 5px solid;
- }
- </style>
- <h1>USANDO OPERADORES COMPARACION<h1>
- <form action="validacion.php" method="post" name="datos_usuario" id="datos_usuario">
- <table width="15%" align="center">
- <tr>
- <td>Nombre:</td>
- <td><label for="nombre_usuario"></label>
- <input type="text" name="nombre_usuario" id="nombre_usuario"></td>
- </tr>
- <tr>
- <td>Edad:</td>
- <td><label for="edad_usuario"></label>
- <input type="text" name="edad_usuario" id="edad_usuario"></td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td colspan="2" align="center"><input type="submit" name="enviando" id="enviando" value="enviar"></td>
- </tr>
- </table>
- </form>
- <h1>CALCULADORA<h1>
- <form action="" method="post" name="form1" id="calculadora">
- <table width="15%" align="center">
- <tr>
- <td>Dato 1:</td>
- <td><label for="num1"></label>
- <input type="text" name="num1" id="num1"></td>
- </tr>
- <tr>
- <td>Dato 2:</td>
- <td><label for="num2"></label>
- <input type="text" name="num2" id="num2"></td>
- </tr>
- <tr>
- <td>Operacion:</td>
- <td><label for="operacion"></label>
- <select name="operacion" id="operacion">
- <option>Suma</option>
- <option>Resta</option>
- <option>Multiplicacion</option>
- <option>Division</option>
- <option>Modulo</option>
- <option>Incremento</option>
- <option>Decremento</option>
- </select> </td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td colspan="2" align="center"><input type="submit" name="button" id="button" value="calcular"></td>
- </tr>
- </table>
- </form>
- <?php
- include ("calculadora.php");
- if(isset($_POST["button"])){
- $numero1=$_POST["num1"];
- $numero2=$_POST["num2"];
- $operacion=$_POST["operacion"];
- calcular($operacion);
- }
- include ("segunda_prueba.php");
- print "Hola Mundo <br>";
- print " Luis O <br>";
- include ("Clases.php");
- $mazda=new Carro();
- $pegaso=new Camion();
- $mazda->set_color("rojo","mazda");
- echo "El carro tiene " . $mazda->get_ruedas() . " ruedas <br>";
- echo "El camion tiene " . $pegaso->get_ruedas() . " ruedas <br>";
- echo "El camion es de color " . $pegaso->color . "<br>";
- echo "El camion " . $pegaso->frena();
- echo "El camion " . $pegaso->girar();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement