jQuery sortables and how to save the current sorting to mysql
Example I want use this sortables - http://interface.eyecon.ro/demos/sort.html
How to save the current layout setting to MySQL? A开发者_运维技巧ny clue?
You would have to send the information back to the server, most likely with an AJAX call of some sort. Then the PHP server-side could save it to MySQL. jQuery/Javascript cannot communicate directly with the MySQL database, you have to send the data to PHP first.
So an example might be, whenever the layout changes, make a $.get
or $.post
call in jQuery that sends information on the new layout to a php file, which process it and updates the database accordingly.
精彩评论