Hey everyone, to start off I'm very new to all of this and I've been attempting to teach myself coding for a couple weeks to design a web based app for a project at an internship. I've created a sortable list that exports the positions of each item to a database so upon refresh, they don't change. I ultimately want to have 2 lists that update a database and keep the positions of each item on the lists, but I haven't gotten there yet.
I am currently having trouble with my connecting lists and I think the problem is somewhere in my ID & Class definitions. When it is one way it will allow me to sort items from List B to List A, but not in the reverse. And when I change the a few things around in the ID/Class I can now sort the lists as they should, but the List A which is the current working list that updates to a database, no longer works (items go back to previous positions when the page is refreshed).
I am not knowledgeable enough to know what I should have where and again it's probably a silly problem. Thank you all in advance for your time and help. I've highlighted the comments around the area in question, my code is as follows:
------------------------------
<?php require("db.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- When this following part is " id="contentLeft" ", the items in the list called contentLeft will update to the database and save when it is refreshed.
When it is changed to " class="contentLeft" ", now all lists can be sorted BUT now the list contentLeft will not save to the database. -->
<div id="contentLeft">
<!-- When this id is changed, it also alters in a similar way as described above -->
<ul id="contentLeft" class="connectedSortable">
<?php
$query = "SELECT * FROM records WHERE recordListingID<=33 AND recordListingID>0 ORDER BY recordListingID DESC LIMIT 33";