So basically, I have a form with a post method. When I click submit, I can work with the POST superglobal values in PHP, but it clears all the textbox and radio button values and that's what I want to prevent.
(I don't think my code is important, just a basic form, nothing special).
Tried adding onsubmit="return false"
in my HTML form tag, but then my submit button did nothing.
I tried these, none of them worked:
How to stop form auto-reset in JS and HTML?
How to stop the form from resetting
So, how can I prevent the form from clearing all the data but do the POST method?