FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Regarding split text and match from data base
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Regarding split text and match from data base [message #183911 is a reply to message #183843] Mon, 25 November 2013 06:35 Go to previous messageGo to previous message
jalaf28 is currently offline  jalaf28
Messages: 8
Registered: November 2013
Karma:
Junior Member
its new solution it works
but it skip some computers


<?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");
echo "<center><table border=1><tr><th>Ip</th><th>System Name</th></tr>";
while($rr=mysql_fetch_array($rs))
{
$rsr=mysql_query("select * from mac_add where mac_id= '$ex[$k]'");
while( $res=mysql_fetch_array($rsr))
{
/* if($rr[0] == $ex[$k])
{
//echo $ex[$j] . " " . $rr[0] . "<br />";
*/
echo "<tr><td>" .$ex[$j] . "</td><td>" . $res[0] . "</td> </td><td>" .$res[1] . "</td></tr>" ;
}
$j +=21;
$k +=21;


}


echo "</table></center>";

mysql_close();
?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: creating key / hash
Next Topic: from mysql in associative array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 08:50:50 GMT 2024

Total time taken to generate the page: 0.03990 seconds