i have multiple entries with starting with the letter 'a' .. but the query below only displays one result.
<?php
mysql_connect("localhost", "Master", "pword");
mysql_select_db("db");
$letter = htmlentities($_GET['search']);
$user = mysql_query("SELECT DISTINCT keywords FROM Stacks WHERE keywords LIKE '$letter%' ORDER BY keywords")or die (mysql_error());
while($rowz = mysql_fetch_array($user)){
$keyword = $rowz['keywords'];
$name = $rowz['name'];
$bad = mysql_query("SELECT * FROM Stacks WHERE keywords LIKE '$letter%' ORDER BY keywords")or die (mysql_error());
$num_rows = mysql_num_rows($bad)or die (mysql_error());
}
if ($num_rows == 0)
{
echo "<font face='Courier New' font size=18px font color=#FF9900>$letter</font><br /><br />";
echo "<font face='Courier New' font size=3px font color=#FBB917>No Stacks</font><br>";
}
else
{
echo "<font face='Courier New' font size=18px font color=#FF9900>$letter</font><br /><br />";
echo "<font face='Courier New' font size=3px font color=#FBB917><a href='stack.php?search=$keyword&submit=Go!' style='text-decoration: none';>$keyword</a></font><br>";
}
?>