CMS Mastering Development Wordpress

Button per line in Custom Post Types

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:

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.


Leave a Reply

Your email address will not be published. Required fields are marked *