开发者

jQuery sortables and how to save the current sorting to mysql

开发者 https://www.devze.com 2023-01-12 21:49 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消