I am running PHP 7.0.22 on two ubuntu 16.04.1 LTS servers: a web server and an app server. They are both instances of AWS EC2.
When I have the following code on the app server
<form action="http://example.com/uploadFiles.php" method="get" enctype="multipart/form-data">
<label for="file" style="font-size:5mm; font-family:times-new-roman">Select up to 20 filenames:</label>
<input type="file" name="file[]" id="file" multiple="multiple"/></br>
<input type="submit" name="submit[]" value="submit" />
<input type="hidden" id="LoggedIn" name="LoggedIn" value="<?php echo $_SESSION['LoggedIn'] ?>">
<input type="hidden" id="setName" name="setName" value="<?php echo $setName ?>">
<input type="hidden" id="UserName" name="UserName" value="<?php echo $_SESSION['UserName'] ?>">
</form>
and the following code in uploadFiles.php on the web server
<html>
<body>
<?php require("menu.php"); ?>
<?php
var_dump($_GET);
?>
</body>
</html>
I get
array(5) { ["file"]=> array(1) { [0]=> string(32) "file.name" } ["submit"]=> array(1) { [0]=> string(6) "submit" } ["LoggedIn"]=> string(1) "1" ["setName"]=> string(4) "test" ["UserName"]=> string(12) "OtagoHarbour" }
However, if I have the following code on the app server
<form action="http://example.com/uploadFiles.php" method="post" enctype="multipart/form-data">
<label for="file" style="font-size:5mm; font-family:times-new-roman">Select up to 20 filenames:</label>
<input type="file" name="file[]" id="file" multiple="multiple"/></br>
<input type="submit" name="submit[]" value="submit" />
<input type="hidden" id="LoggedIn" name="LoggedIn" value="<?php echo $_SESSION['LoggedIn'] ?>">
<input type="hidden" id="setName" name="setName" value="<?php echo $setName ?>">
<input type="hidden" id="UserName" name="UserName" value="<?php echo $_SESSION['UserName'] ?>">
</form>
and the following code in uploadFiles.php on the web server
<html>
<body>
<?php require("menu.php"); ?>
<?php
var_dump($_POST);
?>
</body>
</html>
I get
array(0) { }
Is there a way to get what I am getting with GET using POST?
I do not know of this is relevant but I did not have this problem before I set SSL up on my website.