Question:
I’m making a form and when I use POST the target page refreshes and I lose the result. If you look quick you can see the correct output display correctly. GET works fine with no issues. POST works fine when you pop out the webpage into a new tab but not within Replit.
It seems, for some reason, after the POST request (on form submission) a GET request is being made refreshing the page meaning there are no POST values to access so your getting -today/86400… But you already figured that part out. It isn’t your countdown.php file, since I commented out all the PHP and the page was still refreshed…
Edit: I’ve tried updating the PHP version to the latest stable version available on Nix, v8.2.0RC7 to no avail.
It seems PHP web servers are somehow ‘statically’ hosted by Replit, and the issue likely lies in that hosting.
I managed to get it to work if you setup your post request from a file that isn’t the index.php file. And then it only works if I popout the webpage to a new tab.