How to Shake an element with jQuery UI

In the WordPress Admin dashboard login form, the login field animates with a shake effect whenever the user enters incorrect details. This feature can be easily implemented using the jQuery UI library.

With jQuery UI, you can apply a shake effect to an element, specifying the direction and distance of the shake.

This functionality serves to alert users when invalid input is entered.

In the demonstration, a login form is created, and it shakes when an incorrect username and password are entered.

How to Shake an element with jQuery UI

Read more

How to Export MySQL Table data as CSV file in PHP

Exporting MySQL table data to a CSV file is a common need in web development. It provide­s the flexibility of converting your database­ records into an easily readable­ and shareable format.

Whether you want to ge­nerate reports, transfe­r data to another system, or create­ backups, knowing how to export MySQL data to CSV using PHP can be incredibly useful.

This article guide­s you through the proce­ss of exporting MySQL table data as a CSV file using PHP.

How to Export MySQL Table data as CSV file in PHP

Read more

Sorting the Table by clicking Header with AJAX

With sorting the list it is easier for the user to locate items in a sorted list than unsorted. It rearranges the data in specific order (ascending or descending).

You can either use PHP or AJAX to get the sorted data.

I am using AJAX to sort the list in this tutorial.

In this tutorial, I am displaying the employee’s list and attach click event on the table column header. Whenever header gets clicked then send an AJAX request with column name to sort with.

Sorting the Table by clicking Header with AJAX

Read more

Step-by-Step: File Uploads Made Easy with Dropzone.js and PHP

In web development, file upload functionality is a common requirement for many applications. PHP offers multiple choices for file uploads, but among them, Dropzone.js is widely favored. This JavaScript library streamlines the file upload process and offers an interface that can be customized and easily used by users.

Dropzone.js can be used with or without jQuery in your project, and it does not have any additional library requirements. This library does not handle file uploads to your server directly. In this tutorial, PHP will be used for uploading.

File upload can be done by either dragging and dropping or by using the file chooser dialog that opens when the drag n’ drop widget is clicked. While uploading, Dropzone.js displays a progress bar, generates a thumbnail image, and provides file size preview after uploading.

Step-by-Step: File Uploads Made Easy with Dropzone.js and PHP

Read more