I have a simple HTML form (text box and submit button) that redirects to the same page, and prints out the input text.
I notice that when using the POST method to send the input text data along, it only works if the page has been loaded for less than ~40 seconds. Any more, and when I press ‘Submit’, it does not print out the input text. It seems to ‘refresh’.
However, when using the GET method (changing all instances of ‘post’ with ‘get’ in the code below), this time limit does not seem to exist.
I’m curious as to what causes this difference in behavior. Related posts have directed me to increasing max_execution_time, max_input_time, and default_socket_timeout in php.ini, but none of those seems to have any effect when using the POST method.
Developing environment: Cloud 9 IDE, Chrome web browser.
Here’s my code:
<?php if(isset($_POST['textentry'])) echo $_POST['textentry']; ?> <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>Forms</title> </head> <body> <form action="index.php" method="post"> <textarea class="InputTextBox" name="textentry"></textarea> <input type="submit" name="TextSubmit" value="Submit"/> </form> </body> </html>