Ejercicios resueltos de la entrega CU00833B del curso básico de programación web con php desde cero.
HTML<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>PHP Cu00833B</title>
</head>
<body>
<form name="formularioDatos" method="get" action="calcularTiempo.php">
<p> CÁLCULO DEL LLENADO DE DESPOSITO </p>
<br/>
Introduzca el caudal disponible en litros / minuto: <input type="text" name="Q" value="">
<br/> <br/>
Introduzca el diámetro del depósito, en metros: <input type="text" name="D" value="">
<br/> <br/>
Introduzca la altura del depósito, en metros: <input type="text" name="H" value="">
<br/> <br/>
<input value="Calcular" type="submit" />
</form>
</body>
</html>PHP<?php$Q = $_GET['Q'];$D = $_GET['D'];$H = $_GET['H'];$Pi = 3.141593;$R = $D / 2;$V = $Pi * (pow($R, 2)) * $H;$Vlitros = $V * 1000;$tminutos = $Vlitros / $Q;"<br><br>";echo "El tiempo que transcurrirá hasta el llenado del depósito es de, $tminutos, minutos";