I am trying to display all records from my table CarCollection using the following code. Right now I am only able to return the 1st record. how can I achieve this?
$connection = mysql_connect("localhost","USER_NAME","PASSWORD");
if (!$connection)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("DATABASE_NAME", $connection);
$result = mysql_query("SELECT * FROM CarCollection");
$row = mysql_fetch_array($result);
mysql_close($connection);
1 Answer