PHP fails to stay on page after a FORM POST
Expected vs Current Behavior:
I expect to see the page that is created after the POST. Not a reload (or whatever is happening)
Steps to reproduce:
See my simple example hereunder
Bug appears at this link:
Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0
Replit Profile: https://replit.com/@ErwinMoller
Unfortunately I cannot replicate your issue. When I click on the link I can enter two numbers. Clicking on submit performs the calculation as shown:
If this is different to what you are experiencing could you please record a short video / Loom showing what is happening?
Thanks Ian for your quick reply.
Do you try in Firefox? (If yes, I will try to make a video)
Can’t replicate on brave.
Do you mean this?
Video of what I saw (expires after a day).
I’m not sure how to fix it, and it’s probably something with Replit
Yes that is excactly what I see!
Thanks for posting. I was looking into video capturing software that didn’t contain spyware.
It is not what I expect to see on, eg, Apache2 with PHP.
What is the reason for this behaviour?
It doesn’t happen when you open the result in a new tab, so it must have to do with the Replit Webview. I’m not entirely sure what the reason for the behavior is, but obviously it has something to do with the POST and GET methods.
@IanAtReplit Do you know of anything that could be causing what happened here?
@IanAtReplit PLease look at the video that user lightdefusion posted. That is excactly what happens.
I am just a newbie here, but this is pretty basic stuff I am doing (posting a form).
Why is this failing?
@lightdefusion True, I see what you mean. When opening in a new tab this bug doesn’t happen.
Anyway: I have this habbit of reporting bugs.
My first try on replit gives a problem. I really think this schould be fixed, or at least make the problem clear to the user (like you did: Use a new tab)
Just trying to help here. I still classify this a bug.
I still classify this a bug.
It is, technically, a bug. But since it doesn’t do anything wrong outside of Replit, the code does work and so it’s a problem with Replit itself. So for now just use the new tab button, and when this post gets a response (or the bug gets fixed) go back to using either method of viewing the output
Thanks @lightdefusion and @ErwinMoller for the messages. You have worked out what I was going to say (it’s probably related to webview, open in a new tab to make sure it works correctly) - I tried this on Chome without issue but I hadn’t tried it on any other browsers.
I see that @ShaneAtReplit has assigned himself to the call so hopefully he is able to investigate and help.
Could you share the video again? The current one is archived.
Yeah, it’s here.
(P.S. This video too will expire after 24 hours)