Re: Regarding split text and match from data base [message #183935 is a reply to message #183931] |
Wed, 27 November 2013 05:22 |
jalaf28
Messages: 8 Registered: November 2013
Karma:
|
Junior Member |
|
|
Hi Jerry
i already Post It
but now i m post it again..
here is the Code..
<?php
$out=shell_exec("arp -a");
$ex=explode(" ",$out);
$j=21;
$k=32;
$ln=@mysql_connect("localhost","root","");
if(!$ln)
{
die("Could not Connect to The Server");
}
mysql_select_db("mysql") or die("Could Not Connect with database");
$rs=mysql_query("select * from mac_add");
while($rr=mysql_fetch_array($rs))
{
$rsr=mysql_query("select * from mac_add where mac_id= '$ex[$k]'");
while( $res=mysql_fetch_array($rsr))
{
echo "<tr><td>" . htmlspecialchars($ex[$j]) . "</td><td>" . htmlspecialchars($res[0]) . "</td> </td><td>" . htmlspecialchars($res[1]) . "</td></tr>" ;
}
$j +=21;
$k +=21;
}
echo "</table></center>";
mysql_close();
?>
|
|
|