The following code selects categories from MYSQL. It lists the categories and creates links. When a user clicks on the category they want, its supposed to select the images from the database where the category. It works when the category is one work like Animal but if the category is Sports & Games, it doesn't work because of the spaces. Is there a way to get it to recognize the spaces?
thanks
$result = mysql_query("SELECT * from tshirts",$db);
if ($myrow = mysql_fetch_array($result)) {
do {
echo ("<table border=0 align=center width='80%'>
<tr>
<td class=event align=left><a href='/NewCindys/includes/test.html?category=$myrow[category]'>$myrow[category]</a></td>
</tr>
");
} while ($myrow = mysql_fetch_array($result));
echo ("</table>\n");
} else {
echo "<br><br><p align=center>There Are No Products Available At This Time!</p>";
echo "<br><br><p align=center>Check Back Soon!</p>";
}
?>