This commit is contained in:
Dávid Jančár 2024-05-29 12:28:28 +02:00
parent ef8dd588a4
commit b3c4a3fc6c
2 changed files with 2 additions and 1 deletions

@ -1,7 +1,7 @@
<?php
$target_dir = "uploads/";
if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST["submit"])) {
if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST["submit"]) && $_POST["heslo"] = "davidjesuperfakt") {
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;

@ -3,5 +3,6 @@
<form action="/index.php" method="post" enctype="multipart/form-data">
Vyber súbor na nahratie:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="text" name="heslo">
<input type="submit" value="Nahrať súbor" name="submit">
</form>