I’m trying to run a very file file upload thing on an amazon lightsail machine running apache that I own. For some reason when I click submit the next page displays the html but I get an error saying method wasn’t post and to use enctype. I added this to my form page and nothing changed unfortunately.
<form action="submission.php" method="post" enctype="multipart/form-data"> <label for="pdf">Upload your pdf</label> <input type="file" id="pdf" name="pdf" accept=".pdf"></br></br> <label for="pics"> Optional extra credit </label> <input type="file" id="pics" name="pics" accept="image/*"></br></br> <input type="submit" value="Submit"> </form>
I then use something like
$_POST["pdf"] to retrieve the information
EDIT: while writing this post my lightsail instance stopped working so i can’t get the exact code
Source: Ask PHP