php - Run Query of Wordpress in a Button Javascript - WPDB -


i want run javascript function javascript sending $variables when running single button, not how make connection of $wpdb javascript.

any appreciated.

http://code.tutsplus.com/tutorials/writing-custom-queries-in-wordpress--wp-25510

for example:

$wpdb->update(     'foods',     array(         'fruit' => 'apple',  // string         'year' =>  'value2'  // integer (number)     ),     array( 'id' => 1 ),     array(         '%s',   // value1         '%d'    // value2     ),     array( '%d' ) ); 

when press button in event onclick query run in javascript not how make connection base give run query.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -