Jalrock
03-06-2003, 05:50 PM
What would I need to do here to only print the ip's that the first 5 numbers in the ip are the same?
<?php
require "./con.php";
include "./header.inc";
$result = mysql_query("SELECT * FROM employees",$db);
while ($myrow = mysql_fetch_array($result)) {
echo "<table border=1>";
printf("<tr><td width=300><a href=\"%s?id=%s\">%s</a></td> \n", "index.php", $myrow["id"], $myrow["ip"]);
printf("<td width=45><a href=\"%s?id=%s&delete=yes\">(DELETE)</td></tr></a>", $PHP_SELF, $myrow["id"]);
echo "</table>";
}
include "./footer.inc";
?>
Any help appreciated.
<?php
require "./con.php";
include "./header.inc";
$result = mysql_query("SELECT * FROM employees",$db);
while ($myrow = mysql_fetch_array($result)) {
echo "<table border=1>";
printf("<tr><td width=300><a href=\"%s?id=%s\">%s</a></td> \n", "index.php", $myrow["id"], $myrow["ip"]);
printf("<td width=45><a href=\"%s?id=%s&delete=yes\">(DELETE)</td></tr></a>", $PHP_SELF, $myrow["id"]);
echo "</table>";
}
include "./footer.inc";
?>
Any help appreciated.