admin管理员组

文章数量:1332383

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.

Marcelo

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.

Marcelo

Share Improve this question edited Jun 30, 2020 at 12:34 nmr 4,5672 gold badges17 silver badges25 bronze badges asked Jun 29, 2020 at 14:08 MarceloVMarceloV 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

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

本文标签: Button per line in Custom Post Types