Wordpress Options-Page to own Database Table -
i'm learning programming plugin wordpress. had create option page input fields. work , input datas saved in wordpress database table wp_options.
i had create own database table wordpress , want save informations these input field in own table.
does know how must prepare copy of options.php own informations saved in own table?
since values saved in wp_options table, believe have valid connection wp database on page. save own table, use wordpress database class reference $wpdb:
$wpdb->insert( 'table', array( 'column1' => 'value1', 'column2' => 123 ), array( '%s', '%d' ) );
where 'table' custom table, 'column1' column , 'value1' form value. view full detail of wordpress database class reference via https://codex.wordpress.org/class_reference/
Comments
Post a Comment