in mt .tp file I have a loop that outputs Publish or something similar for each entry. I don't want it to refresh the page when clicking on the so I want to call some json instead to call a module and pass some parameters to update the Database but I am not sure how to go about it. Do I need a new module with something like this in it?
function menudemo_menu() {
$menuitems['menudemo'] = array(
'title' => 'My Menu',
'page callback' => 'menudemo_mymenu_page_callback',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
return $menuitems;
}
function menudemo_mymenu_page_callback() {
return 'My Menu URL was hit';
}
And how do I pass the parameters