Files
aulaphp/aula6.php
111111111111111111111111111 EMAIL bf0d0595ed aulinha›
2025-10-02 20:01:35 -03:00

66 lines
1.5 KiB
PHP

<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aula 6</title>
<link rel="stylesheet" href="estilo.css">
<style>
</style>
</head>
<body>
<header><h1>Aula 6</h1></header>
<nav></nav>
<main>
<form action="aula6.php" method="POST">
<table>
<tr>
<td>Início:</td>
<td><input type="number" name="ini" ></td>
</tr>
<tr>
<td>Fim:</td>
<td><input type="number" name="fim" ></td>
</tr>
<tr>
<td><input type="reset" value="Limpar"></td>
<td><input type="submit" name="Enviar"></td>
</tr>
</table>
</form>
<?php
if(isset($_POST["ini"])){
$ini = $_POST["ini"];
}
else{
$ini = null;
}
if(isset($_POST["fim"])){
$fim = $_POST["fim"];
}
else{
$fim = null;
}
if($ini != null and $fim != null){
$x = $ini;
while($x <= $fim){
$y = 1;
while($y <= 10){
$z = $x * $y;
echo"<p>$x X $y = $z</p>";
$y++;
}
$x++;
echo"<br><br>";
}
}
?>
</main>
<footer><h1>Programação WEB II - Prof James Willian</h1></footer>
</body>
</html>