Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 700345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:29:13+00:00 2026-05-14T03:29:13+00:00

Hoping that using something like this demo it is possible to drag items within

  • 0

Hoping that using something like this demo it is possible to drag items within and between two columns, and update their order either live or with a “save” button to MySQL. Point being that you can make changes and return to the page later to view or update your ordering.

http://pilotmade.com/examples/draggable/

Doing it for just one column is fine, but when I try to pass the order of both columns, the issue seems to be passing multiple serialized arrays with jQuery to a PHP/MySQL update script.

Any insight would be much appreciated.

If you look below, I want to pass say…

sortable1
entry_1 => 0
entry_5 => 1

sortable2
entry_3 => 0
entry_2 => 1
entry_4 => 2

EDIT: This ended up doing the trick

HTML

<ol id="sortable1"><li id="entry_####">blah</li></ol>

jQuery

<script type="text/javascript">
$(function() 
{
    $("#sortable1, #sortable2").sortable(
    {
        connectWith: '.connectedSortable',
        update : function () 
        { 
            $.ajax(
            {
                type: "POST",
                url: "phpscript",
                data: 
                {
                    sort1:$("#sortable1").sortable('serialize'),
                    sort2:$("#sortable2").sortable('serialize')
                },
                success: function(html)
                {
                    $('.success').fadeIn(500);
                    $('.success').fadeOut(500);
                }
            });
        } 
    }).disableSelection();
});

This is the PHP query

parse_str($_REQUEST['sort1'], $sort1);
foreach($sort1['entry'] as $key=>$value)
{
do stuff
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:29:14+00:00Added an answer on May 14, 2026 at 3:29 am

    what I would do is split them up

       data    :
        {
          sort1:$('#sortable1').sortable('serialize'),
          sort2:$('#sortable2').sortable('serialize')
        }
    

    then when you post you can get the request and set them as needed, I hope that makes sense

    so what I do is this

    parse_str($_REQUEST['sort1'],$sort1); 
    
    foreach($sort1 as $key=>$value){
        //do sutff;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a QTreeView to display a hierarchy of items. Something like this
I've come across a routine that does something like this: static public Bitmap byte2bmp(byte[]
I am fairly new at using the ASP.NET MVC framework and was hoping that
I'm hoping that someone has found a way of doing this already or that
I'm running into a mental roadblock here and I'm hoping that I'm missing something
I'm concerned that this might be working on an NP-Complete problem. I'm hoping someone
Is it possible to identify classes that implement IDisposable. I was hoping to do
I am hoping that someone can help me with this regex, I need to
I'm hoping there's a simple way to do this without using a sub-query: Scenario:
Apologies if this question has been asked before. I'm hoping that someone can step

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.