Webbserverprogrammering 1

Show sourcecode

The following files exists in this folder. Click to view.

Webserver1/Ovningar/Repetition/

rep1.php
rep2.php
rep3b.php
rep3c.php
rep4.php
rep5.php

rep2.php

24 lines UTF-8 Windows (CRLF)
<!DOCTYPE html>
<html lang="sv">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Repetition Repetition Repetition</title>
</head>
<body>
  <form action="" method="get">
    <p>Skriv in 3 nummer här:</p>
    <input type="number" name="num1">
    <input type="number" name="num2">
    <input type="number" name="num3">
    <input type="submit" value="Skicka">
  </form>
  <?php
  $n1 
= isset($_GET["num1"]) ? $_GET["num1"] : NAN;
  
$n2 = isset($_GET["num2"]) ? $_GET["num2"] : NAN;
  
$n3 = isset($_GET["num3"]) ? $_GET["num3"] : NAN;

  echo 
"<p>Max: " max($n1$n2$n3) . "</p>";
  
?>
</body>
</html>