hello friends I am showing the status of a query and I add a specific color but I notice it as very old, that kind of model and I would like to show it a little different the old model is the example with the blue color and how I would like to show it is the example with the yellow color:
here my query:
<?php
class crud
{
private $db;
function __construct($DB_con)
{
$this->db = $DB_con;
}
/* paging */
public function dataview($query)
{
$stmt = $this->db->prepare($query);
$stmt->execute();
if($stmt->rowCount()>0)
{
while($linea=$stmt->fetch(PDO::FETCH_ASSOC))
{
$status_color = array(
'Pendiente' => '#b71c1c',
'Procesando' => '#1565c0',
'Procesado' => '#fbc02d'
);
echo "<tr>
<td>$linea[nombres])</td>
<td>$linea[apellidos]</td>
<td>$linea[totalpago]</td>
<td align=center class='center-align white-text'
bgcolor='". $status_color[$linea['status']] ."'>$linea[status]
</td>";
?>
the div I use to show it in a different way than the current one
'echo "<td align=center><div class='col s10 card-panel yellow darken-2 center'><p class='black-text'>$linea[status]</h5></div></p>";'