Question: Use php mysql: When the teacher selects a class, an option will appear to choose the subjects for that class only and not all subjects.

Use php mysql: When the teacher selects a class, an option will appear to choose the subjects for that class only and not all subjects. Then all students will watch for that class so that the teacher can enter the grades for the first test, second test, midterm, and final test.
Note: The teacher cannot enter all the grades at once. He can only enter the grades for the first test, but when the test comes again, he can make changes on the same page. so the add result and update in one forms.
An image showing the desired page desgin forms
tables structure
CREATE TABLE IF NOT EXISTS `tblresult1`(
`id` int NOT NULL,
`StudentId` int DEFAULT NULL,
`ClassId` int DEFAULT NULL,
`SubjectId` int DEFAULT NULL,
`quiz1` varchar(4) DEFAULT NULL,
`quiz2` varchar(4) NOT NULL,
`midterm` varchar(4) NOT NULL,
`final` varchar(4) NOT NULL,
`PostingDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`UpdationDate` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `tblclasses`;
CREATE TABLE IF NOT EXISTS `tblclasses`(
`id` int NOT NULL AUTO_INCREMENT,
`ClassName` varchar(80) DEFAULT NULL,
`Section` varchar(5) NOT NULL,
`CreationDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`UpdationDate` timestamp NOT NULL DEFAULT '0000-00-0000:00:00' ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2111115 DEFAULT CHARSET=latin1;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `tblsubjects`;
CREATE TABLE IF NOT EXISTS `tblsubjects`(
`id` int NOT NULL AUTO_INCREMENT,
`SubjectName` varchar(100) NOT NULL,
`SubjectCode` varchar(100) NOT NULL,
`Creationdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`UpdationDate` timestamp NOT NULL DEFAULT '0000-00-0000:00:00' ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb3;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `tblstudents`;
CREATE TABLE IF NOT EXISTS `tblstudents`(
`StudentId` int NOT NULL AUTO_INCREMENT,
`StudentName` varchar(100) NOT NULL,
`RollId` varchar(100) NOT NULL,
`ClassId` int NOT NULL,
`RegDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`UpdationDate` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`Status` int NOT NULL,
PRIMARY KEY (`StudentId`),
UNIQUE KEY `RollId`(`RollId`)
) ENGINE=InnoDB AUTO_INCREMENT=518 DEFAULT CHARSET=utf8mb3;
 Use php mysql: When the teacher selects a class, an option

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!