I am a first poster here so please excuse my noob-like behavior.
I have a
button on my website that when pressed should disappear, and a form should be echoed out in its place without a page refresh.
My question is: Can I do this only using PHP, WITHOUT a page refresh?
Not in a way I think you'd want to do it, but you could use an iframe that contains the button. The button would be a link or form submit and the navigation would happen inside the iframe to your form. This way, only the iframe is refreshed, but the full page remains unchanged.
Cannot comment or I would have but the answer would be no. PHP is server side so the only way for it to update a view is to reload to a new page. Also, I would think it is very unlikely to run into a situation where JS is disabled these days.