I am trying to create a php function in wordpress where a user answers a question on one page and then prints their answer on the next page after they hit submit.
The data does not need to be collected in a database just printed so it shows what the user typed.
Thanks in advance!
You could use a form to do this. Create HTML form with an input for the answer that gets submitted to a php file on submit:
Then have a PHP file (called print.php in this example);