jquery drag and drop save to database php

Today, We want to share with you jquery drag and drop save to database php.In this post we will show you dynamic drag and drop with jquery and php, hear for drag and drop reorder images using jquery ajax, php mysql we will give you demo and example for implement.In this post, we will learn about drag and drop jquery in php with an example.

PHP – Dynamic Drag and Drop table rows using JQuery Ajax

Step 1: Create Database Table

SQL Query:

CREATE TABLE IF NOT EXISTS `sorting_items` (

  `title` varchar(120) NOT NULL,
  `description` text NOT NULL,
  `position_order` int(11) NOT NULL,
  PRIMARY KEY (`id`)


Step 2: Create index.php File

Example 2: index.php

    Dynamic Drag and Drop table rows in PHP Mysql- pakainfo.com


Dynamic Drag and Drop table rows in PHP Mysql - www.pakainfo.com

query($sql); while($user = $users->fetch_assoc()){ ?>
# Name Defination

Step 3: Create Database Configuration File


Step 4: Create ajaxPro.php File


    $sql = "Update sorting_items SET position_order=".$i." WHERE id=".$v;


I hope you get an idea about Using jQuery or MooTools For Drag, Drop, Sort, Save.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment