Show data from custom table in admin subpage
-
Hello,
I hope I get some answers with this post – I’m searching now for a few days. There are a lot of tutorials on how to start with plugin development and how to create subpages in the backend and how to create custom post types as well es custom taxonomies. But somehow I couldn’t find any tutorial which explains how to create, access, read, filter, sort, add, delete data within a custom table.
My scenario right now is pretty straight forward – I pretty much went through all tutorials from this channel – which showed me also a nice part on how to be more structured and how to use php composer within plugin development -> Alecaddd I also work now with Classes and Controller Classes as well as with templates. So far so good.
So to come back to my scenario:
1) I have a custom database table created during activation
2) I have an activated plugin with sub pages
3) I can access sub pages and show some straight forward HTML content
4) I already have some tabs to navigate within the subpage (first tab should show all data as a html table, second tab should show a form to enter data which will be submitted to the table)
5) I want to access the database custom table and read / show the data on a sub page
6) I want to write data to the database custom table with the formAnd this is were I don’t have any clue how to start with! So, I really hope that somebody can share a link to a tutorial on how to do that.
To create the form – of course – I could just use the standard HTML syntax to create a native form and also create some PHP variables to fill the form fields in case of an edit. But would this be the right approach?
Many thanks in advance.
Best Regards
Aaren
The topic ‘Show data from custom table in admin subpage’ is closed to new replies.