Try this instead
<?php
//$category=$HTTP_GET_VARS['category'];//uncomment in case the below doesn't work
$category=$_GET['category'];
$sql="select * from profiles where category = '$category' ";
$sql_result=mysql_query($sql,$connection) or die("couldn't execute query");
?>