Retain AJAX pagination position after Refresh in CodeIgniter

AJAX pagination makes it easier to display the large list of records in multiple pages without refreshing the whole page when navigating.

While navigating pages if you refreshed the webpage then it will load record from 1st instead of page position before the refresh.

E.g. If you are on the 5th page then it will again start from 1st when webpage reload.

To retain the position, I am using COOKIE to store the page number and use it after page successfully load to fetch records in CodeIgniter.

Retain AJAX pagination position after Refresh in CodeIgniter

Read more

Upload and Store video to MySQL Database with PHP

By storing media files in the MySQL database make it easier to retrieve files uploaded by the user or in a specific category.

For this require storing the file on the server and saving the reference to the database.

In the tutorial, I show how you can upload and store video to the MySQL database table with PHP. Also, show how you can display stored videos in the database.

Upload and Store video to MySQL Database with PHP

Read more

How to send AJAX request from WordPress theme

AJAX makes easier to perform operations without submitting the form like – fetch, insert, delete records from MySQL database, file uploading, etc.

Using AJAX in WordPress is a little different. Here, need to consider two things –

  • AJAX sent URL should be admin-ajax.php.
  • wp_ajax action hooks.

In this tutorial, I show how you can handle AJAX request in your WordPress theme.

How to send AJAX request from WordPress theme

Read more