Php three-level linkage menu

Source: Internet
Author: User
Tags character set phpmyadmin

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 -- ---- 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 );

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.