Tuesday 13 February 2018

Include Other Web Pages On Button Click | Dynamic Page Using JavaScript And HTML | WAMP


Source Code:- Home_Page.php 


<center><h1 style="background-color: darkgreen"><font color="yellow">Dynamic Page</font></h1></center>
<table border="1" height="100%" width="100%">
    <tr>
        <th width="20%" onclick="document.getElementById('dynamic').innerHTML='<iframe src=Pagignation.php width=100% height=100%></iframe>';     ">
         First Page  
        </th>
        <th rowspan="4" id="dynamic">
        
        </th>
    </tr>
    <tr height="85%">
        <th>
           
        </th>
    </tr>
</table>

Sunday 11 February 2018

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>

Friday 2 February 2018

PHP Tutorial : Find Upcoming Date From Database | WAMP | LAMP | phpmyadmin



Source Code :- Next_day.php
<?php
//$name=$_POST["name"];
$con=new mysqli("localhost","root","","test");
$result=$con->query("select * from dates order by date ASC");
$year=date("Y");
while($row = $result->fetch_assoc()) {
       // echo "Date:" . $row["date"]." Day :". $row["name"]."<br/>";
        if($year==  substr($row['date'], 0, 4))
        {
           
            if((int)substr($row['date'], 5, 6)==(int)date("m"))
            {
                if((int)substr($row['date'], 8, 9)>(int)date("d"))
                {
                    echo "Upcoming Date:" . $row["date"]." <br/>Upcoming Day :". $row["name"]."";
                    break;
                }
            }
            else if((int)substr($row['date'], 5, 6)>(int)date("m"))
            {
                echo "Upcoming Date:" . $row["date"]." <br/>Upcoming Day :". $row["name"]."";
                break;
            }
        }
    }
?>