<!DOCTYPE HTML>
<html>
<head>
<title>Test Downloader</title>
</head>
<body>
<h3>Downloader Test Page</h3>
<form id="myForm" name="myForm" method="POST">
<input type="text" id="myInput" name="myInput" value="" ><br><br>
<input type="Submit" name="Submit" value="Download" type="button">
<input type="Submit" name="List" value="Show Counters" type="button">
<?php
if ($_SERVER["REQUEST_METHOD"] === "POST") {
    if(isset($_POST['List'])){
        header('Location: https://' .  $_SERVER["SERVER_NAME"] .'/ListCounters.php');
        exit;
    } else {
        if(isset($_POST['Submit'])){
            header('Location: https://' .  $_SERVER["SERVER_NAME"] .'/Downloader.php?File=' . $_POST['myInput'] );
            exit;
        }
    }
}
?>
</FORM>
</body>
</html>