vendredi 4 mars 2016

How can I create a table and update it in building a wordpress plugin?

I am creating a wordpress plugin. My plugin needs a table with three columns. I found out how to create the database on the plugin initialization. But I am coming accross an issue with my settings page and inserting them into the table that I built.

My table consists of three columns: name, optionname, optionvalue. I have made the admin menus: View active settings and add new settings. I want to make it so after I go to the Add New and fill out the form and hit submit it will insert the data into my table.

I have tried creating a page to handle this through the $_Post variable, but when I hit submit it shows the error that I don't have permission to view this page.

Is there an easier way around this? Or is there a way that I can give permissions to that additional page without adding a sub menu?

EDIT:

How do I add user input from the plugin settings page that I made to my custom database table?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire