Sunday 4 February 2018

PHP Tutorial | Easiest Way To Add Pagination On Web Site | Using php, phpmyadmin, Javascript

Watch video and you follow my steps to perform pegination on web site..

Source code :-

<html>
    <head>
        
       
    </head>
<body>
    <?php
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "tutorial";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);

$sql = "SELECT * FROM employees";
$result = $conn->query($sql);
while($row = $result->fetch_assoc())
        {
            echo "id: " . $row["id"]. " - Name: " . $row["name"]."<br/>";
        }
?>
        <button onclick="getElementById('page').innerHTML='Dynamic Display'">Click here</button>
      
    <div id="page"></div>
</body>

No comments:

Post a Comment