Good morning everyone,
I have a table, which is a query select
of the data of the devices I control. In it I have several elements, such as Name, MacAddress and IP, for example.
In the IP column, I want a link
and from it (the IP of my device) I make another query by filtering data only from that device.
Follow my code:
echo '<table>';
echo '<tr>';
echo '<td width="270"><center><b>NOME DO DISPOSITIVO</b></td>';
echo '<td width="130"><center><b>IP</b></td>';
echo '<td width="230"><center><b>MAC ADDRESS</b></td>';
echo '<td width="130"><center><b>GATEWAY</b></td>';
echo '<td width="130"><center><b>REDE</b></td>';
echo '<td width="230"><center><b>MÁSCARA DA REDE</b></td>';
echo '</tr>';
echo '</table>';
while($aux = mysqli_fetch_assoc($sql)) {
echo '<table id="tborpo"><tbody><tr id="tbcorpo">';
echo '<td id="nome" width="270">'.$aux["NAME"].'</td>';
**echo '<td width="130"><a href="fichas/ficha.php">'.$aux["IPADDR"].'</a></td>';**
echo '<td width="230"><center>'.$aux["MACADDR"].'</td>';
echo '<td width="130">'.$aux["IPGATEWAY"].'</td>';
echo '<td width="130"><center>'.$aux["IPSUBNET"].'</center></td>';
echo '<td width="230"><center>'.$aux["IPMASK"].'</center></td>';
echo '</tr></tbody></table>';
}
'