简体   繁体   中英

I want to create a menu editor for my website using PHP and AJAX

I created menu.php which loads the menu items from a MySQL database, parses them through a function which creates the code for the menu items which are then displayed in order in an HTML list (tell me if this is confusing and I can post the code). What I would like to make is an admin page the would allow the user to reorder the menu items, BTW they are sorted by an order column.

thanks in advance :)

edit: The main part where I'm stuck is creating the user interface where the user can shift the menu items around (hopefully drag and drop) and then saving the new order to the database.

I would start out with the jQuery UI sortable widget:

http://jqueryui.com/demos/sortable/

I think this is what you are searching for :

http://www.hdeya.com/blog/2009/05/sorting-items-on-the-fly-ajax-using-jquery-ui-sortable-php-mysql/

It uses the jquery sortable plugin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM