Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include ("includes/const.php");?>
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>ex 2</title>
- <link rel="stylesheet" type="text/css" href="css/ex1.css">
- </head>
- <body>
- <form action="formulario-envio 2.php" method="post">
- <?php echo campo1 ?> <input type="text" name="nome" ?><br>
- <?php echo campo2 ?> <input type="number" name="peso" ?><br>
- <?php echo campo3 ?> <input type="text" name="altura" ?><br>
- <input type="submit" value="Enviar">
- </form>
- </body>
- </html>
- EX.2.PHP -----------------------------------------------------------
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Untitled Document</title>
- </head>
- <body>
- <p> <?php echo($_POST["nome"]); ?><br></p>
- <p> <?php echo($_POST["altura"]); ?><br></p>
- <p> <?php echo($_POST["peso"]); ?><br></p>
- <?php
- $imc =round($_POST["peso"] / ($_POST["altura"]*$_POST["altura"]),2);
- ?>
- <p> <?php echo($_POST["imc"]);
- if($imc < 18.5)
- {
- echo(" --> Abaixo do Peso");
- }
- else if($imc < 24.9)
- {
- echo(" --> Peso Normal");
- }
- else if($imc < 29.9)
- {
- echo(" --> Sobrepeso");
- }
- else if($imc < 34.9)
- {
- echo(" --> Obesidade Grau I");
- }else if($imc < 39.9)
- {
- echo(" --> Obesidade Grau II");
- }
- else if($imc> 40)
- {
- echo(" --> Obesidade Grau III ");
- }
- ?></p>
- </body>
- </html>
- FORMULARIO ENVIO 2.PHP--------------------------------------------------------------------
- <?php
- define("bemvindo", "Bem vindo à Escola EPI");
- define("campo1", "Nome:");
- define("campo2", "Peso:");
- define("campo3", "Altura:");
- define("campo4", ":");
- define("campo5", "Posição Procurar: ");
- define("campo6", "Procurar: ");
- define("campo7", "substituir: ");
- ?>
- CONST.PHP----------------------------------------------------------------------------------
- body{
- width:1000px;
- margin:auto;
- }
- h1{ color:#0084FF;
- font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
- }
- form{
- font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
- }
- input{ font-size:13px;
- background-color:rgba(255,0,4,1.00);
- font-weight:bold;
- font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
- }
- EX 1.CSS---------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement