PHP + Mysql + jQuery query and list box selection operation example _ php tips-php Tutorial

Source: Internet
Author: User
This article mainly introduces the implementation process of PHP + Mysql + jQuery query and list box selection operations. if you need it, refer to this article to explain how to query mysql data through ajax, the returned data is displayed in the list to be selected, and then selected to add the option to the selected area, which can be used in many background management systems. The operations on the list box in this article depend on the jquery plug-in.

HTML

 

Description: The HTML content is a form containing a query input box, a list box, and related buttons.

MYSQL data table structure

CREATE TABLE IF NOT EXISTS `t_mult` (  `id` int(11) NOT NULL auto_increment,  `username` varchar(32) NOT NULL,  `phone` varchar(20) NOT NULL,  PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 

Table t_mult is a contact data table, including the name and mobile phone number fields.

CSS

  

In this example, only the style files required by the Multiselect plug-in are loaded. you can design other CSS files by yourself.
JAVASCRIPT
First, you need to reference the two js files required in this example.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.