I am building a small business directory with the following code.
<?
require('connect.php');
/* Performing SQL query */
$query = "SELECT * FROM directory GROUP BY business_type";
$result = mysql_query($query) or die("Query failed : " . mysql_error());
$count = 0;
$numcol = 4; // number of columns
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
while($row = mysql_fetch_array($result))
{
if($count % $numcol == 0)
echo '<tr align="center">';
echo '<td width="25%"><a href="test.php$Id=$row[business_type]">' . $row['business_type'] . "</a></td>\n";
$count++;
if($count % $numcol == 0)
echo '</tr>';
} // end while($row = mysql_fetch_array($result))
echo '</table>';
?>
My problem is that I want to create a hyperlink - notice the code above:
<a href="test.php$Id=$row[business_type]">
I need to display the results for $row[business_type] but it doesnt show the results in the hyperlink. What do I need to do?
Thanks