I have a simple form in my PHP project using POST method to send data. Everything works well on the most computers, but there is a strange problem on only one of them. Imagine that this is my simple form:
<form action="controller/save.php" method="post">
<input type="text" name="username">
<input type="submit" value="show">
</form>
And this is my PHP file:
<?php
print_r($_POST);
?>
In all cases, it returns an array containing the value of username variable. But only on one case, it returns
Array()
I have been never seen such behavior and unfortunately couldn't understand what is the issue. May you help me please?
var_dump(file_get_contents('php://input'));
The input stream contains the raw request body. If this is empty, you have a client side problem, if there is data, you have server side problem.