Php three-level linkage menu

Source: Internet
Author: User

Tested (table structure: id Table ID (unique) title: ID of the flid category of various titles (Category 1: Class 2: Class 3) ID of the class on the pid (category is followed by category, when submitting a class, write the class ID here, and when submitting a small class, write the class ID ))

<? Php $ link = mysql_connect ("localhost", "root", "root") or die ("database server connection error ". mysql_error (); mysql_select_db ("sanji", $ link) or die ("database access error ". mysql_error (); mysql_query ("set character set gb2312"); mysql_query ("set names gb2312");?> <Html>

Database called "sanji" -- phpMyAdmin SQL Dump -- version 2.11.4 -- http://www.phpmyadmin.net ---- host: localhost -- generation date: November 03, 2009 -- Server version: 5.0.51 -- PHP version: 5.2.5SET SQL _MODE = "NO_AUTO_VALUE_ON_ZERO "; ---- database: 'sanji' ---- -------------------------------------------------------- TABLE structure 'sanji' -- create table if not exists 'sanji '('id' int (10) not null auto_increment, 'title' varchar (30) collate utf8_unicode_ci not null, 'flid' int (10) not null, 'pid 'int (10) not null, primary key ('id ')) ENGINE = MyISAM default charset = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT = 5; ---- export the data in the table 'sanji' -- insert into 'sanji' ('id', 'title ', 'flid', 'pid ') VALUES (1,' I am 1', 1, 1), (2, 'I am 2, belongs to 1 Cano', 2, 1), (3, 'I am 3, belong to 2 authorization', 3, 2), (4,' I am 4, also belong to 2 authorization', 3, 2 );

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.