How to use the database to achieve the output of the corresponding data (description may be a bit about the problem, confidential)

Source: Internet
Author: User
How to use the database to achieve the output of the corresponding data (description may be a bit of a problem, confidential)?
Now the code has been appended at the end. I want to add an office name, just insert into officename the table.
But here Officename and Officecode are written dead by JS. If this is added, the corresponding problem of the two, the newly added data, there is no corresponding officecode, which need to be manually added in the JS code, it is not reasonable to feel this.

So I think is not through JS, but directly from the database read, Officename table set up two fields name and code
It is possible to do this directly by reading the database and matching the two. How to operate, preferably with an example, thank you










------Solution--------------------
It's all changed.
 
  
 
















Office name
!--? phpinclude (' conn.php '); $sql = "SELECT * from Officename"; $query =mysql_query ($sql); while ($result =mysql_fetch_array ($query)) {?>
br>
  • 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.