I am writing a simple plugin to accept a user number, show a form with information about the user, then post a payment amount. The user number is obtained from this http file include_once(PLCOA_ADMIN_PATH . 'views/plcoa-payment-start.php'); and loads perfectly. The info form is filled out using the php file include_once(PLCOA_ADMIN_PATH . 'views/plcoa-payment-add.php'); It has only one field - the payment amount in the form. When the Submit Button is pressed it runs this function.
function payment_post(){
if ($_POST['post_action'] == 'Post')
{
//I do my db INSERT here
}
wp_redirect (PLCOA_ADMIN_PATH . 'views/plcoa-payment-start.php');
exit;
}
I've spent hours trying to figure out what I have wrong and I know it's simple. This is all running in the admin area. If I re_direct to an external site it works just fine. Is there some other way to re-direct, after inserting the record in the db, back to the start form?
Thanks in advance!