aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Vitkov <alexvitkov98@gmail.com>2021-02-12 13:32:00 +0200
committerAlex Vitkov <alexvitkov98@gmail.com>2021-02-12 13:32:00 +0200
commitad0826bd624a965fc93fb40b7266854e2ce52e8e (patch)
tree85043ab4c7f68dc47d0099b3c8ec60b5dfcbb68f
parent907a4604fd7b8415c166b0949f059da9a5463554 (diff)
downloadfileup-ad0826bd624a965fc93fb40b7266854e2ce52e8e.tar.gz
form encoding
-rw-r--r--loggedin.php2
-rw-r--r--php/upload.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/loggedin.php b/loggedin.php
index 74c0b10..b525ed6 100644
--- a/loggedin.php
+++ b/loggedin.php
@@ -12,7 +12,7 @@
</div>
-<form id="upload_form" style="display:none;" action="php/upload.php" method="post">
+<form id="upload_form" style="display:none;" action="php/upload.php" method="post" enctype="multipart/form-data">
<input id="filename" name="filename">
<input type="file" name="the_file" id="the_file">
</form>
diff --git a/php/upload.php b/php/upload.php
index b6cd335..ba29cb0 100644
--- a/php/upload.php
+++ b/php/upload.php
@@ -9,6 +9,8 @@ if (!isset( $_POST["filename"]) || !isset($_FILES["the_file"]))
exit(1);
}
+echo "adsf";
+
$file = $_FILES["the_file"];
$filename= $_POST["filename"];