I've tried adding a PHP session, so they don't have to fill in the same password all the time. If I go to the page and fill in the code it will show the page with the correct session but when I refresh the page the session is gone.

Code of the session:

```
<head>
    <script>
        { background-color:#87CEFA; }
    </script>
</head>

<?php
    error_reporting(0);
    session_start();

    $_SESSION["pass"] = $_POST["code"];
    $pass = $_POST["code"];

    $con=mysqli_connect("localhost","bb","$pass","bb");
    if (mysqli_connect_errno($con))
    {
        echo "Kan geen verbinding maken, de ingevulde code is verkeerd of de server is      offline!";
        echo 'Hello '.$_SESSION["pass"].'!';
    }

    $result = mysqli_query($con,"SELECT * FROM ftp");
    while($row = mysqli_fetch_array($result))
    {
        $myuser = $row['user'];
        $mypass = $row['pass'];
        $myhost = $row['host'];

        $conn_id = ftp_connect($myhost) or die("Couldn't connect to $myhost"); 
        if (@ftp_login($conn_id, $myuser, $mypass))
        {
             //Path to your *.txt file:
             $file = $ftp_server['DOCUMENT_ROOT'] . "bbbb";
             $contents = file($file); 
             $string = implode($contents); 

             echo $string;
         }
     }

     mysqli_close($con);
?>

```

Thanks.