Hello I'm querying a database of names by the first letter of the last name. However when I excute the query and print the results, the first name prints over and over again when in reality theres more than one name to print out. here is what I have so far. the data passed in is a letter in which it supppose to gather all the last names with that beginning letter. what I'm I doing wrong that can cause this infinite loop?
function displayprofs()
{
print"<div>";
print "<p><a href = '$_SERVER[PHP_SELF]'>return to start</a>\n";
$abc=($_POST['abc']);
print"$abc";
$db = adodbConnect();
$query="Select * FROM Category WHERE Description LIKE '$abc%'";
$result=$db->Execute($query);
$row=$result->FetchRow();
while($row)
{
$name= $row['Description'];
print "<form method='post' enctype='multipart/form-data' action='$_SERVER[PHP_SELF]'>\n";
print"<input type='hidden' name='profy' value='$name'>";
print"<p>$name<input type='submit' name='add' value ='Submit'/></p>\n"; //submit button
print"</form>\n";
//break;
}
print"</div>";
}
while($row=$result->FetchRow())instead ofwhile($row)and remove$row=$result->FetchRow()