Showing posts with label JQUERY. Show all posts
Showing posts with label JQUERY. Show all posts
Previous & Next Functionality with PHP, AJAX, JQuery and MySQLView Comments
Here i have designed a very simple application to fetch data from mysql server with php, through Ajax. In this application i have used two image input component for previous and next functionality and a table to display the data. Here is the preview of the application.
![]() ![]() You can download the application: ![]() On clicking the next button, the ajax function is called through this JQuery function $("#next").click(function(){It sends the index of the next set of data to fetch, to the ajax function. On success the data in the view is updated and the index of current data set is updated. The checkVisible function is to ensure the next previous functionality. i.e, the Next button will be disables on reaching the last data set and the previous button will be disable on reaching the first data set. function checkVisible(){In the ajaxpost file the MySql database fetch is executed. $limitquery = "select id,name,category,price,discount from previousnext limit ".(int)$_REQUEST['current'].",".$limit;The data send from sql server is parsed in the php file and send to the client. while($row = mysql_fetch_array($result)){In the next post i have planned to expand this application to have pagination. Donot forget to comment on my ideas.
Subscribe to:
Posts (Atom)
About UsCategories
Followers |