I am either not pasting the correct code into the right area or it just doesn't work because now I get a blank page when I try and view the webpage. This is the whole code of what I did below.
<?php
$con=mysqli_connect("192.168.1.158","jfogel","Slave123","aps");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM aps");
echo "<table border='1'>
<tr>
<th>ID</th>
<th>Site</th>
<th>AP Name</th>
<th>IP Address</th>
<th>MAC Address</th>
<th>AP Location</th>
<th>Status</th>
</tr>";
while($row = mysqli_fetch_array($result))
$str = exec("ping -n 1 -w 2000 $row['IP_Address']", $input, $result);
if ($result == 0){
{
echo "<tr>";
echo "<td>" . $row['ID'] . "</td>";
echo "<td>" . $row['Site'] . "</td>";
echo "<td>" . $row['AP_Name'] . "</td>";
echo "<td>" . $row['IP_Address'] . "</td>";
echo "<td>" . $row['MAC_Address'] . "</td>";
echo "<td>" . $row['AP_Location'] . "</td>";
echo "<td>" . $row['echo "Online";
}else{
echo "Offline";
}
'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>