Pagination in Php with Next and Previous Button

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to another video tutorial in this video I'm gonna teach with you how you can make presentation and PHP with next and PDS page this is a demo of the project and tolar paginations and this is the next page I'm gonna click on the second one then you will be able to see the previous button has been appeared I'm gonna click on the yes button then I am able to see the first page I am able to use the next button next button and next button and next button this is the last page after displaying the lost records then you are able to see the next button esteem disappeared okay the same thing available on here I click on the first one then you are able to see please button has been disappeared okay so let's create that I'm gonna open my project like localhost pagination demo this is a project I will write that course inside this project okay so I'm gonna use a notice that RCS a file to design the table and this is the index dot PHP file inside this file I will just write simple basic syntax of HTML and I use pagination and PHP but next and three dispatch we need to include the CSS file good step dot CSS and now the next thing is we need to check the Buddhist departing or not so check Inc I will use put just a class like it display for and I'm gonna open the browser and the fella patch everything ever perfect right okay so first thing we need to design the table TR TD okay those are my static data I need to assign the class table table state I will use another class okay so let's check it now on the process okay this is our user ID this is our second column calm right now the next thing we need to make a connection okay so I will create a connection with another file I will try to convict or injury and so that we need to yes basic Sanders of HP and make a connection variable quite mask-like connect first one is localhost second only the root third one is the null fortune in your database near my database name is ax is our system I think this is a I'll check it out later but this time I'll use that and I use dollar corn if connection is not stable then come into the f-body and display the message please check your connection right now I need to check the a database so I mean I relate PHP myadmin and then we need to wait a couple of seconds to open the PHP myadmin database I'm gonna set this our system and just a match is our system and the SR system have a pagination okay everything you're perfect is a system determind Dallas okay I'm gonna use simple basic syntax of index dot PHP file the first one is that we need to include the file connections file require ones config dot PHP then we need to use cheery slept steady strong pagination okay this is my travel name we need to use my sky like Judy and pasta two parameter first one is the connection secondly the curie variable right this is our basic knowledge all about how you can use curie to get the data from database and how you can use the my scale IQ t to assign the database variance a result variable right now the next thing we need to display those I'm in database data on the browser so we need to use TR tag and inside the TR tag we need to use while why first one is a you need to make a variable and call my SQL I fetch associate and said that you need to pass result variable to get the data from database okay and we need to close this one okay and we need to got that and outside of the theater we need to test it yeah but we need to okay after the closing TR tag we need to write the best sex index of PHP and closing tag inside the basic and closing PHP sent X we need to close the while loop is clip records inside this section I need to copy those titties and paste here and you need to just write s extenders of PHP and write row database column name ID I think ID you need to wait a couple of seconds I did this isn't my first column name and second one is a user so we need to copy that yesterday my second one is a user named Todd bunny then use that you know this is the last one is the email save that and let's check now on the browser I can't see data on the puzzle my school I fetch associate select the static from pagination I need to copy that just a little guys this is why you throw my stretches and see it he's talking or keoki days we need to use it echo statement guys okay serve that and let's check it now on the dosa okay guys everything else perfect we are able to see 24 cards available on the page okay we need to use presenation and PHP we need to make a pagination so what I need to do to make a pagination guys you need to follow on to step the first step first I've need to use a set dollar underscore cleared and this is a my get variable I will clear this name variable and get variable on later but this time I assigned the name of the get variable okay if I said that underscore get page variable is active then coming to the F body and makeup variable and assign the get variable value inside a cage variable right and I'll statement we need to assign the page variable value one if this is active then the gate variable value we will assign and setup page variable otherwise come into the Earth's party and set the page variable we need to assign the one made right this is a very simple now the next thing we need to make variable num page you can write any name then how many pages you want to display on the browser I want to display the file just write the numbers and assign numbers inside the variable then we need to call another variable start from and assign the reading so we need to call dollar page variable minus PI 1 and divide by how many pages you want to display on the browser 5 okay why I have written this statement the default one page I mean default page number is the one so we need to minus 1 then page variable when is a zero zero multiple by five means five value will be stored inside that started okay now the next thing is because I'm going to show with you in just a minute guys I used a cool start but you can't see D basically this is a game baby I need to make a get variable then you will be able to see this data okay but don't worry I will teach with you step a step now the next thing we need to write the limit inside the cutie the limit is a very simple quite limit cheaper and first one is the unit of light starts from where page will be started you need to pass the first I mean second variable that will get the five value from this this system then the next is how many pages you want to display on the browser I need to call number page okay this variable this variable assign inside the variable okay this is the starting number okay first I'm gonna show you just a minute just a minute I use zero means starting number zero and display fire card okay this means zero to start and display file card okay so I need to use start from start star variable and number right now first I check it but you will see the I can't see that of why I have used this statement okay okay let's check it - now good statement and I'm gonna check how many and I used exit function to stop the program after displaying this variable baby check it as you're going to get a seal means this statement will stall zero when you say that start from variable and I assigned this video on here means zero to five okay starting number is zero and number page is a file and you are able to see just a minute I need to remove this statement then you will be able to see fire cards available on there as you can see that's right okay you need to close that now the next thing we need to call this is statement okay now the next thing we need to go on below after this terrible after the table tag we need to write the PHP syntax and we need to make another curri curri is very simple just write select fit from pagination and call PR the result my sqlite cutie vast parameter connection and CUNY I mean PR key variable right then we need to get the total records from the database okay how many numbers numbers records available inside the database so we need to make up first one is a total record and I need to call masculine Rose function to get the complete record from the database that will get the numbers of recorded the numbers so I'm gonna use a call and total talk so said that and let's check it now on the browser oh my Slenderman expected there is a problem 56 total regard masculine no me rose okay we need to pass this one the river let's say you know as you can see guys 12 numbers two cars available inside the database right I mean we are able to access to make a pagination and PHP with twelve numbers okay we know how many results how many pages will be created inside the 12 car okay now the next thing we need to do is we need to cater variable total pages and we need to call the total the card first one is the total the card variable divided by number pledge variable okay then we will be able to see such I write custom and total page then you will be able to see numbers of Records I mean number of Edge has been appear 2.4 okay this is that this is the float value but we need to get the integer so how I can get the integer label guys you just need to cut that and write the cell function parenthesis and paste the same variables then you will be able to see integer value has been appeared how many pages will be created three okay now the next thing is we need to call for so I'm gonna use far I and assign the value one they starting page number reserve one PI less than total pages variable okay I use I bless them right and I plus plus then come into the father body and said that body first I write 30 and can take and we need to cut index teach me this is my page name I mean file name then we need to call question mark sign and page variable this is a gate variable I've written this variable honorable you know rice and this is a gate variable value will assign inside the gate very bright so I have written this variable on here then the next thing we need to write the equal sign and double quotation and said the double quotation will need to write dot dot and IV first I can't date and write the cout statement and double quotation and paste the code right terminal design okay just a minute there is a problem okay we need to write single quotation single quotation and this is single rotation right just a minute guys last one close and we need to use dollar sign inside what is this total pages I okay everything else perfect now this is a basically ankle link I mean link and this is a kid variable each time this variable will give an starting time number one then two and then three if this variable value and in total pages variable feeding is less than of available then you will be able to see number of pages will be appeared inside the trouser so I need to also use dollar and first I said that analysts not on the browser as you can see guys 1 & 2 kgs appeared inside the page now the next thing we need to call first I write the simple plus vtn pigeon okay we need to call just about this plus vtn pigeon why yes Singapore ven-ven success is Grammy first L their energy dunno okay - catches him in two patterns okay now the next thing is first I check it okay I'm able to see page this is the my gate variable and we'll use it true okay I click on number one and I'm able to see page get variable and we'll use every one and you are able to see one to file cards available and six to ten cars available next day but I can't see the next one page okay but don't worry I was creative next and please button then you will be able to see to and other cards will be appear first I am going to show it to you how many cards available on it as you can see 12 but I am able to see tender cards right ok so the first thing is we need to make page this page so after this statement before Lu I'm going to use if the page variable value greater than 1 and then come into that if body I'm gonna copy that right now we need to just write inside in the I Section emphasis Paige - that fun this page is a variable declared on Apple as you can see that this variable okay this variable will get the get variable video right I'm gonna show you this video okay with this value this value okay the get variable value is a true one right if page variable value greater than one then come into the if body and display the ankle link our button to display leave basically butter okay so inside the Incan link I just liked PDS better and I need to change the color like ginger said that and for the page as you can see guys first I'm gonna share with you a starting time okay this is our first page I'm gonna click on second van and you are able to see the previous button has been a bit I click on that and I am able to see the first one page right now the next one is a we need to copy the same statement and I'm gonna display the next button okay but we need to copy and paste if a statement after the father okay why I used this course because I want to display the series vice page and I mean buttons okay inside this is statement you just write the I'm available greater than the page variable value then coming to the in just a minute come into the body and entities stop maybe one minute and the variable a variable key just call next letter and let's check it now right I mean I click on that number two and you click on that as you can see guys i am able to see second one two cards available on here and i am able to see my next pattern has been hidden okay i'm gonna click on previous yes right - this is a competition and PHP okay I'm gonna display the number of the card number of God on his page to sell and let's say now second one that van for one gift one such time okay that's it so this is called pagination in PHP I have used simple statement to make regeneration PHP made next and previous button thank you very much for watching please subscribe my channel for creating updates they were nasty guys
Info
Channel: OnlineITtuts Tutorials
Views: 41,223
Rating: undefined out of 5
Keywords: Pagination in Php with Next and Previous Button, pagination with next and previous button, pagination in php, OnlineITtuts Tutorials
Id: qxNXS5PeID4
Channel Id: undefined
Length: 27min 25sec (1645 seconds)
Published: Mon Mar 11 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.