Here is the code I currently have to retreive my first set of results:
include('connect.php');
$result = mysql_query("SELECT art_name FROM artist WHERE 1 ORDER BY art_name ASC");
if ($result)
{
for ($i=0; $i < mysql_num_rows($result); $i +=2)
{
$row = mysql_fetch_array($result);
echo "<tr>";
echo "<td align=center>" . $row['art_name'] . "</td>";
if ((mysql_num_rows($result) % 2) == 0)
{
$row = mysql_fetch_array($result);
echo "<td align=center>" . $row['art_name'] . "</td>";
}
echo "</tr>";
}
}
What I want is for the art_names to link via id.
I know the code is roughly along the lines of
<a href='details.php?id=".$id."' target='main'>" . $row['art_name'] . "</a>
but where does the $id = ['art_id']; go?