0
Good morning, you guys,
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 wish for a link
and from it (the IP of my device) I do another query filtering the data only from that device.
Follows 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>';
}
`
I don’t understand one thing. You want this IP field to be a link for you to click and be redirected to a page with the data of this link?
– adrianosmateus
Perfectly. I don’t know how to make this link "submit" (I don’t know if Submit is the best method) for a php function that Filters the fields.
– Anderson Fidelis
You want to do it dynamically on the same page where you are or you want to be redirected even to another one, like a href?
– adrianosmateus
I wish I was a true href.
– Anderson Fidelis