I building a site in WordPress (my own theme) that includes a very simple "sign up" email form. Person enters name and email address and hits submit button. Client currently using a script through Bluehost so I want to recreate vs. using a form plugin.
The form is fine. After hitting "submit" person is redirected to a "Thank You" page. I would like to be able to add a "back to page" link after the "Thank You for signing up" message that would take them back to whatever page they were on (the form will be on most site pages).
Tried adding this to the template:
<?php $url = htmlspecialchars($_SERVER['HTTP_REFERER']); echo "<a href='$url'>Back to Page</a>"; ?>
but it generates an error message because it's kicking back to Bluehost, not to the original page.
Can anyone help?