Hi,
Does any one help me in formating the output result in PHP with mysql?
The code is here.
<form action="hostrep.php" method="get">
</form>
<?
$username="root";
$password="";
$database="databasename";
$host="localhost";
$today = date("F j, Y, g:i a");
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
#echo "Connected successfully";
#$softwareid=$_GET['softwareid'];
#$softwareid1=$_GET['softwareid1'];
$query="SELECT hostid,hostname,cabinetnumber FROM host";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
echo "<b><center>Host Details  $today</center></b><br><br>";
$i=0;
while ($i < $num) {
$hostid=mysql_result($result,$i,"hostid");
$hostname=mysql_result($result,$i,"hostname");
$cabinetnumber=mysql_result($result,$i,"cabinetnumber");
echo "<b>$hostid                       $hostname                                    
$cabinetnumber     <br><br>";
//echo "<b>$softwareid $manufacturer</b><br>name: $name<br>Version: 
$version<br><hr><br>";
Thanks
 


---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.

Reply via email to