I need to add a link in each table record brought from mysqli to another .php file, how can I add t
I need to add a link in each table record brought from mysqli to another .php file, how can I add t
***************index.php**************
```<body>
<div class="datatable-container">
<h2>Panel de Entregas a Clientes</h2>
<hr>
<table name="tbl-contact" id="tbl-contact" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>N.E</th>
<th>Fecha</th>
<th>Conductor</th>
<th>cliente</th>
<th>L.Entrega</th>
<th>Ticket</th>
<th>Estacion</th>
<th>H.S.T</th>
<th>H.LL.C</th>
<th>H.S.C</th>
<th>H.LL.T</th>
<th>T.A</th>
<th>T.I</th>
</tr>
</thead>
</table>
</div>
</body>```
**************server.php*********************
```$table = 'entregas';
// Llave primaria a usar
$primaryKey = 'id_entrega';
include("server.php");
$consulta= "SELECT * FROM entregas";
$ejecutaConsulta= mysqli_query($conexion, $consulta);
while ($dato=mysqli_fetch_array($ejecutaConsulta)):
$columns = array(
array( 'db' => 'echo $dato["id_entrega"] ', 'dt' => 0),
array( 'db' => 'fecha', 'dt' => 1),
array( 'db' => 'conductor', 'dt' => 2),
array( 'db' => 'cliente', 'dt' => 3),
array( 'db' => 'l_entrega', 'dt' => 4),
array( 'db' => 'ticket', 'dt' => 5),
array( 'db' => 'estacion', 'dt' => 6),
array( 'db' => 'h_s_tienda', 'dt' => 7),
array( 'db' => 'h_ll__cliente','dt'=> 8),
array( 'db' => 'h_s_cliente', 'dt' => 9),
array( 'db' => 'h_ll_tienda', 'dt' => 10),
array( 'db' => 'tiempoActivo','dt' => 11),
array( 'db' => 'timeInactivo','dt' => 12)
);```
This question has an accepted answers - jump to answer
Answers
Maybe
columns.render
is what you need. There are examples in the docs showing how to create a link.Kevin