Skip to content
Advertisement

Retrieve Data from POST Method and Display in HTML H1 Tag

Greetings,

I am developing a website using WordPress and elementor. I have a form with the POST method on page1 which is redirecting the user to page2. How do I receive that data on page2 and display it in the H1 tag on the same page?

Advertisement

Answer

Data submitted from a form with the method='post' attribute can be accessed using the $_POST superglobal. For example:

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement