Creating a WordPress form with a PHP script and default header

Question

I am trying to create a custom form in WordPress.

Step 1 of the form is HTML code that collects data and sends it to a PHP file through the post method, and then writes it to the MySQL database and creates Step 2 of the form using PHP code.

My problem is that I want to include the default WordPress header and footer in Step 2 of the form that WordPress uses in Step 1. Is there a way to do this by including the code of header.php and footer.php in my PHP script?

I have tried putting this at the top of the script:

<?php get_header(); ?>

but it gives me an undefined function error.

0
, , Stephen Rose 7 years 2016-10-06T09:11:12-05:00 0 Answers 69 views 0

Leave an answer

Browse
Browse