Edit Delete DataTables record with AJAX and PHP

With the use of the DataTables jQuery plugin, you can list your records in pagination format.

You can add HTML elements like – buttons, link, image, etc with a record.

For this need to pass element in HTML string format from the PHP script.

In this tutorial, I show how you can add edit and delete buttons in the Datatables AJAX pagination with PHP.

NOTE – I am using the Bootstrap modal to update a record.

Edit delete DataTables record with AJAX and PHP

Read more

How to Export MySQL data to CSV by Date range with PHP

CSV file is been used for data import, export, and generating a report.

If you have huge data available in the MySQL database and you only require a specific date range data but the file contains all records and you need it on your own.

By adding a date filter to the form you just need to pick the range and export it.

In this tutorial, I show how you can export MySQL database data in CSV format by date range with PHP. I am using jQuery UI for datepicker.

How to Export MySQL data to CSV by Date range with PHP

Read more

Date range search in DataTable with jQuery AJAX and PHP

DataTable comes with a single search box that you can use to search on all or specific fields and display filtered records.

You can add custom elements according to your requirements and use them with DataTable.

In this tutorial, I show how you can implement a date range search in DataTable with jQuery AJAX and PHP. I am using jQuery UI for adding date picker.
Date range search in DataTable with jQuery AJAX and PHP

Read more

How to send GET and POST AJAX request with JavaScript

AJAX is a web de­velopment technique­ that facilitates the exchange­ of data between the­ website visible on a use­r’s browser and its server-side­ database. This enables se­amless communication for optimal performance and use­r experience­.

JavaScript libraries or frame­works are commonly utilized by people­ to conveniently transmit AJAX reque­sts. Although it’s essential to recognize­ the significance of transmitting AJAX reque­sts with plain JavaScript as well.

To communicate with the server, use an object called XMLHttpRequest. It helps in sending and receiving data between the client-side and server-side.

In this tutorial, I show how you can send GET and POST AJAX requests with JavaScript and handle the request with PHP.

How to send GET and POST AJAX request with JavaScript

Read more