Click here to Skip to main content
15,921,660 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I need to create a student database to a college. i create it. Now i need to add a form which contains dependent dropdown list in it. That the form need to have 3 dropdown list on is show the dept(department) and next need to show the selected department related years the final one need to show the sections of selected year of department. my database name is department and my table name is students.my table is
Table structure for table `students`
--

CREATE TABLE IF NOT EXISTS `students` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(200) NOT NULL,
`faname` varchar(200) NOT NULL,
`dept` varchar(200) NOT NULL,
`year` int(200) NOT NULL,
`section` varchar(200) NOT NULL,
`contact` varchar(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=46 ;

--
-- Dumping data for table `students`
--

INSERT INTO `students` (`id`, `name`, `faname`, `dept`, `year`, `section`, `contact`) VALUES
(43, 'Vetri Kumar', 'Raja', 'BABL', 4, 'A', '9500671384'),
(38, 'Nandhini', 'Krishnan', 'BCA', 3, 'A', '9965224881'),
(39, 'Sakthi', 'Mahendhran', 'BABL', 3, 'B', '8608769454'),
(44, 'raji', 'raja', 'BABL', 4, 'B', '9874563210'),
(45, 'Nithi', 'devraj', 'BCA', 3, 'A', '9865230140');
Posted
Updated 30-Mar-20 16:11pm

1 solution

Assumption: php/MySQL implies you're very likely doing web development.

I suggest you look into AJAX - which will allow you to update sections of your form based upon changes to other sections.

AJAX calls are in javaScript, which calls a .php file with the appropriate code (like the value from a changed dropdown selection).

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900