[Custom Plugin] Add, update, delete database data
-
Hi,
I wonder if any of the community can help me.
I have created a plugin which has basic functionality through the shortcode. But I am creating an plugin options page which utilises the
admin.php?page={plugin-name}
. I want to be able to click on “Add New” and it takes me to a custom page which I can add new items to the DB, but I want to add it to a custom table
wp_{plugin-name}
where the value field has data stored similar to:
a:1:{s:2:"cat_name";s:3:"Plugins";s:8:"cat_slug";s:32:"plugins";}
I would also like to be able to click on edit and it redirects me to the edit page and outputs the data by id. Also I would like to be able to click delete and it deletes the row by id.
Is there any functions or script I can use the achieve this and retrieve the to be able to use on the main plugins options page and frontend.
Many Thanks
Stephen
- The topic ‘[Custom Plugin] Add, update, delete database data’ is closed to new replies.