I built a contact form in PHP inside a WordPress page, using the exec-php plugin to val and run the code. However, the WordPress rewrite system seems to override the POSTed form data being sent to the page. Is there any way to ensure that this data gets passed through? All I have in my ,htaccess is the standard WP rewrite block.
Leave a Reply
You must be logged in to post a comment.
Yes you can access forrm POST variables in a page of WordPress.
I created a page template like this:
Then I created a page through WordPress admin panel and used above page template.
You can see I have a sample form “test” in this page template. Now when I visited the newly created page in my browser and entered some text in form and submitted the form I got this for
var_dump($_POST);
line:As you can see WordPress doesn’t interrupt anything and your page has full access to your
$_POST
array for Form POST variables.