My code is only showing one record from the database how would i get it to show all the records from the database and not just one.?
PHP Code:<?php
include("config.php");
mysql_connect("$host", "$username", "$password");
mysql_select_db($db) or die(mysql_error());
// Retrieve all the data from the "example" table
$result = mysql_query("SELECT * FROM ip")
or die(mysql_error());
// store the record of the "example" table into $row
$row = mysql_fetch_array( $result );
// Print out the contents of the entry
echo "IP: ".$row['ip'];
echo " Reason: ".$row['Reason'];
?>




Reply With Quote