I am trying to make a plugin for wordpress in which I show the client the account status of their clients. What I do is simple, a query to a database in which there is a list of clients and the status of them, whether they are active or not.
<?php
/**
* Plugin Name: Clienre
* Plugin URI: http://cliente.com.ar/
* Description: Sistema de usuarios para cliente.
* Version: 1.0
* Author: cliente
* Author URI: http://cliente.com.ar/
* Text Domain: cliente
* License: GLP2
* @package cliente
*/
try {
$conn = new PDO('mysql:host=localhost;dbname=db', 'root', '');
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e){
echo "ERROR: " . $e->getMessage();
}
$udate = $conn->query("SELECT * FROM clientes");
$rw = $udate->fetch();
echo $rw['code'];
?>
Everything works fine, but the problem is that the data is seen on the client's page and not on the desktop. I want to do something like WooCommerce, but simpler, much simpler.