$s=mysql_query("select count(*) as TOTAL from nombredelatabla"); $row=mysql_fetch_array($s); echo $row["TOTAL"];