0

Since several hours ago I am trying to solve this issue but I don't know what I am doing wrong in the code.

I have a Custom Post Type with several records, then I wrote a php script to show the content as a table:

Query Table

At the end of each row there is a button, the idea is to pass the row's POST_ID value to other form and php script. However, after you click this button, it opens a new tab with the URL including the name of the site and Post_ID value like https://telework/wp-admin/admin.php?Id=2749&submit_btn=Pagar.

The button's code is:

<td> <form type="post"><input type="hidden" name="Id" value="<?php echo $post_id; ?>"><input type="submit" name="submit_btn" value="Pagar"></form></td>

I've tried to insert action="process.php" inside <form>, then change the type="post" to method="post" but gives me error 500.

How and where can I include the code to open the new form and php script? Thank you for your help and have a good day.

Marcelo

0

Anybody have this similar issue, please read this info at https://premium.wpmudev.org/blog/handling-form-submissions/, this helps me a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.