Your first query is doing exactly what you tell it to.. it is listing all relation_usr_id info that matches your '$cat_name' value on one row. There is no line break in your loop:
while ($row = mysql_fetch_array($result))
{
$relation_usr_id = $row["relation_usr_id"];
echo $relation_usr_id;
}
if you want them on separate lines... use: echo $relation_user_id . "<br>";
Your 2nd query will also only display 1 result as $row is overwritten each time it cycles a record. So only the last record will be in the $row array.
echo ("<table width=50% align=center>");
while ($row = mysql_fetch_array($result))
{
echo ("<tr><td colspan=2>" . $row["co_name"] . "</td></tr>");
}
echo "</table>";
will display all the Contractor names on individual rows of a table...
Hope that helps... Without your form code, it's hard to tell exactly what you're looking at or for.