$resultspon=mysql_query("select count(*) from autopages_sponsored where ( category ='$category' and state ='$state' )",$db)or ie("oops");
while($myrowspon=mysql_fetch_array($resultspon)) { $spcount=$myrowspon["0"]; }
if ($spcount>"0")
{
$resultspon=mysql_query("select * from autopages_sponsored where ( category ='$category' and state ='$state' )
",$db );
while($myrowspon=mysql_fetch_array($resultspon))
{ echo ("