Plugin Author
ka2
(@ka2)
Hi there,
Thank you for your inquiry.
The example of when want to insert from as “functions.php” of your theme are as follows:
<?php
global $cdbt;
$table_name = "my_table";
$insert_id = $cdbt->insert_data($table_name, array('column1' => 'value1', 'column2' => 'value2'));
echo $insert_id;
The example of when want to insert using a Web-api are as follows:
<?php
$url = 'http://your.web.site/?cdbt_api_key=<API key>&cdbt_table=my_table&cdbt_api_request=insert_data&data={column1:value1,column2:value2}';
$response = file_get_contents($url);
var_dump($response);
Please try an above.