Advertisement
Guest User

cABULAS pARA oS BURROS

a guest
Oct 24th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. <?php include ("includes/const.php");?>
  2. <!doctype html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <title>ex 2</title>
  7. <link rel="stylesheet" type="text/css" href="css/ex1.css">
  8. </head>
  9.  
  10. <body>
  11.  
  12. <form action="formulario-envio 2.php" method="post">
  13. <?php echo campo1 ?> <input type="text" name="nome" ?><br>
  14. <?php echo campo2 ?> <input type="number" name="peso" ?><br>
  15. <?php echo campo3 ?> <input type="text" name="altura" ?><br>
  16.  
  17. <input type="submit" value="Enviar">
  18.  
  19.  
  20. </form>
  21.  
  22. </body>
  23. </html>
  24.  
  25. EX.2.PHP -----------------------------------------------------------
  26.  
  27.  
  28.  
  29. <!doctype html>
  30. <html>
  31. <head>
  32. <meta charset="utf-8">
  33. <title>Untitled Document</title>
  34. </head>
  35.  
  36. <body>
  37.  
  38.  
  39.  
  40. <p> <?php echo($_POST["nome"]); ?><br></p>
  41. <p> <?php echo($_POST["altura"]); ?><br></p>
  42. <p> <?php echo($_POST["peso"]); ?><br></p>
  43.  
  44. <?php
  45. $imc =round($_POST["peso"] / ($_POST["altura"]*$_POST["altura"]),2);
  46. ?>
  47.  
  48.  
  49. <p> <?php echo($_POST["imc"]);
  50. if($imc < 18.5)
  51. {
  52. echo(" --> Abaixo do Peso");
  53. }
  54. else if($imc < 24.9)
  55. {
  56. echo(" --> Peso Normal");
  57. }
  58. else if($imc < 29.9)
  59. {
  60. echo(" --> Sobrepeso");
  61. }
  62. else if($imc < 34.9)
  63. {
  64. echo(" --> Obesidade Grau I");
  65. }else if($imc < 39.9)
  66. {
  67. echo(" --> Obesidade Grau II");
  68. }
  69. else if($imc> 40)
  70. {
  71. echo(" --> Obesidade Grau III ");
  72. }
  73. ?></p>
  74.  
  75.  
  76.  
  77.  
  78.  
  79. </body>
  80. </html>
  81.  
  82.  
  83. FORMULARIO ENVIO 2.PHP--------------------------------------------------------------------
  84.  
  85.  
  86. <?php
  87. define("bemvindo", "Bem vindo à Escola EPI");
  88. define("campo1", "Nome:");
  89. define("campo2", "Peso:");
  90. define("campo3", "Altura:");
  91. define("campo4", ":");
  92. define("campo5", "Posição Procurar: ");
  93. define("campo6", "Procurar: ");
  94. define("campo7", "substituir: ");
  95.  
  96. ?>
  97.  
  98.  
  99.  
  100. CONST.PHP----------------------------------------------------------------------------------
  101.  
  102.  
  103.  
  104. body{
  105. width:1000px;
  106. margin:auto;
  107. }
  108. h1{ color:#0084FF;
  109. font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
  110. }
  111.  
  112. form{
  113. font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
  114. }
  115.  
  116. input{ font-size:13px;
  117. background-color:rgba(255,0,4,1.00);
  118. font-weight:bold;
  119. font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
  120. }
  121.  
  122.  
  123. EX 1.CSS---------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement