Hi,
thanks for answer.
Nothing was changed in the plugin, so I still wonder what doesn’t work (formatting of the table doesn’t happen, but i’m not getting any error).
The code has changed a bit, now the table is generated according to the results of a query with a parameter in a search field.
$conn = new PDO("mysql:host=localhost;dbname=almabt5_wpalma", $username, $password);
$compound_name="%{$_POST['compound_name']}%";
$stmt = $conn->prepare("SELECT * FROM wp_fm_data_1 WHERE compound_name LIKE :compound");
$stmt->bindParam(':compound', $compound_name);
$stmt->execute();
echo "<table id='compounds_table'>";
while ($row = $stmt->fetch())
{
$user= $row['user'];
$compound_name= $row['compound_name'];
echo "<tr><td>".$user."</td><td>".$compound_name."</td></tr>";
}
echo "</table>";
echo do_shortcode('[wp_jdt id="compounds_table"]');
Best
Boidot