$total_paginas = ceil($num_total_registros / $TAMANO_PAGINA); ... $num_total_registros = mysql_num_rows($rs);