HI,
I want page by page data diplaying source code, like google.For example, google search-click 1-displaying some content and click 2-display some. That wise, I want Open source code.Please........

Dani AI

Generated

As asked for "page by page" display like Google, there are two practical approaches: static pages (simple hyperlinks) and dynamic, server-driven pagination for database-backed results. 's static-link idea works for a few pages; was correct to point toward PHP for dynamic datasets. The short examples below show a modern, secure server-side pattern (PDO) plus a small AJAX pattern for in-page navigation.

Server-side (PHP + PDO) pagination pattern — replace your_table and fields as needed:

<?php
// $pdo is an existing PDO connection
$perPage = 10;
$page = isset($_GET['page']) ? max(1, (int)$_GET['page']) : 1;
$offset = ($page - 1) * $perPage;

// total rows
$total = (int)$pdo->query('SELECT COUNT(*) FROM your_table')->fetchColumn();
$totalPages = (int)ceil($total / $perPage);

// fetch page safely
$sql = 'SELECT id, title FROM your_table ORDER BY id DESC LIMIT :limit OFFSET :offset';
$stmt = $pdo->prepare($sql);
$stmt->bindValue(':limit', $perPage, PDO::PARAM_INT);
$stmt->bindValue(':offset', $offset, PDO::PARAM_INT);
$stmt->execute();
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>

AJAX fetch for updating results without full reload (client-side):

<script>
document.addEventListener('click', function(e) {
  if (e.target.matches('.page-link')) {
    e.preventDefault();
    fetch(e.target.href)
      .then(r => r.text())
      .then(html => document.querySelector('#results').innerHTML = html);
  }
});
</script>

Practical tips: validate and cast page to int; prefer PDO or MySQLi over old mysql_*; index the columns used in ORDER BY/WHERE; for very large datasets consider keyset pagination (e.g., WHERE id < :last_id ORDER BY id DESC LIMIT N) instead of large OFFSET values; keep perPage reasonable; expose ?q=term&page=N for SEO or use URL rewriting for prettier routes. For a ready-made UI, consider established open-source table/pagination libraries if building the UI quickly.

Recommended Answers

All 3 Replies

Then take help of Google, the is the best source for finding anything.

HI,
I want page by page data diplaying source code, like google.For example, google search-click 1-displaying some content and click 2-display some. That wise, I want Open source code.Please........

If you are using Frontpage you can use some hyperlinks to do that.make sure that each and every page you created is saved with the name which you will use in your hyperlink to link them.As soon as you click on that links it should open the page you want.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.