$num = 1;
$page = $_GET['page'];
$result00 = mysqli_query("SELECT COUNT(*) FROM page");
$temp = mysqli_fetch_assoc($result00);
$posts = $temp[0];
$total = (($posts - 1) / $num) + 1;
$total = intval($total);
$page = intval($page);
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
$start = $page * $num - $num;
$result = mysqli_query("SELECT * FROM page ORDER BY id LIMIT $start, $num");
while ($r = mysqli_fetch_assoc($result)) {
echo $r['title'];
}
mysqli_query
добавь подключение к бд, те $host = "localhost";
$db = "database";
$login = "user";
$password = "password";
$connect = mysqli_connect($host,$login,$password,$db) or die(mysqli_error('Error'));
mysqli_query($connect, "SELECT COUNT(*) FROM page");
mysqli_fetch_assoc
используй mysqli_fetch_row или mysqli_fetch_array
, раз хочешь использовать такой вид $temp[0]