With PHP you would check if any data has been posted to the page. If not, you show the form. If instead you do hava data, you process that data and can show a success message.
The people in the PHP forum can take you further with details on how to do that.
I’ll move this thread over to there now.