Closed Theolodewijk closed 4 years ago
Hi @Theolodewijk . I don't have, but basically the table schema is:
menu_id: int //primary key name: varchar(25) //the menu name content: text // <= THIS IS THE MENU, the json string
You can add more fields according to your needs.
Hi @davicotico, I have written an AJAX-save function to save the whole menu in PHP/MySQL. What is the best way to call this function after every menu change?
Hi @webseitz My apologies for the late response. The short answer is:
$('#btnSave').on('click', function () {
var post = {
"name": $('#txtName').val(), // the menu name
"content": editor.getString(); // json output
};
$.post(/* your POST request */);
});
Do you have full example php pdo insert or update ?