Pass extra data in server side datatables php

Pass extra data in server side datatables php with custom parameter.Datatable is always provided with single text box search.But in some cases we have to to find the data based on condition such as search data between two dates so its not possible in single text box.So we require two textboxes one for from date and second for to date and a button send parameter to PHP page.

Create a index.html file and put the following code.Download Files of datatables from datatables officials site and include those files.

Put this datatable code before body tag and it contains extra parameter that we are posting her frmDate and toDate this will be send to getSearchData.php page and records are filtered.

Create getSearchData.php file and put the following code by specifying parameters.

Put following sql code in your database

 

Comments

  1. By web designers

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *