how to select category and subcategory dropdown in php MySQL?

Today, We want to share with you category subcategory dropdown in php mysql.In this post we will show you Category SubCategory Dropdown in PHP MySQL with JQuery AJAX, hear for PHP MySQL Dynamic Category and SubCategory Dependent Dropdown List using Ajax we will give you demo and example for implement.In this post, we will learn about PHP Get Dropdown List Of All Timezones with an example.

PHP mysql Categories and Subcategories Example

Step 1 : Create Table

CREATE TABLE `brands` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) NOT NULL DEFAULT '0',
  `brand` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Step 2 : Insert some record

INSERT INTO `brands` (`id`, `parent_id`, `brand`) VALUES
(1, 0, 'Bolly4u'),
(2, 0, 'Tamilrokers'),
(3, 1, 'Khatrimaza'),
(4, 1, 'Okhatrimaza'),
(5, 1, 'MoviMaja');

config.php


Step 4 : Create Category Dropdown Form

index.php





    www.pakainfo.com
    
    


    

Brand Subbrand Dropdown in PHP MySQL Ajax - www.pakainfo.com

Step 5 : Fetch Sub Brand

get-subbrand.php






I hope you get an idea about Brand SubBrand Dropdown in PHP MySQL with JQuery AJAX.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment