Need this to show more than 1 result from a table
Posted: Sun Nov 11, 2007 2:13 pm
Hi guys below you will find an extract from a game script i have made
Now, there are multiple entries in the table for each ip, yet it is only showing me one, i would like it to show them all, how would i go about this?
Thank You
~Monotoko
Code: Select all
if ($hello=="")
{
echo "IP doesnt exist";
}
else
{
echo "You were able to ping something, the open ports on this server are displayed below";
$result = mysql_query("SELECT * FROM ports
WHERE ip='$ip'");
while($row = mysql_fetch_array($result))
{
$ports = $row['port'];
}
echo $ports;
}Thank You
~Monotoko