Webbserverprogrammering 1

Show sourcecode

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

webbserver/test/

funktion1.php
test4.php
test5.php
test6.php
test7.php

test4.php

32 lines UTF-8 Windows (CRLF)
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <?php
        
require_once("funktion1.php");

        if (isset(
$_POST["tal"]))
        {
            
$varde $_POST["tal"];
            
$randomarray skapaRandomArray($varde);
            
$resultat medel($randomarray);
            echo 
$resultat;
        }
        else {
            echo 
"skriv in tal";
        }
    
?>

    <form action="" method="post">
        <input type="number" placeholder="hur många tal" min="1" id="tal" name="tal">
        <br/>
        <input type="submit" value="Beräkna">
    </form>

    
</body>
</html>