Create a student attendance form in php. please provide source codeexamples
Answer
the following source code will help you to understand thestudent attendance form
source code:
SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;
CREATE TABLE IF NOT EXISTS `attendance` (
`student` varchar(40) DEFAULT NULL,
`regno` varchar(40) DEFAULT NULL,
`week` varchar(40) DEFAULT NULL,
`date` date DEFAULT NULL,
`unit` int(10) unsigned DEFAULT NULL,
`attended` varchar(40) DEFAULT NULL,
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`),
KEY `student` (`student`),
KEY `unit` (`unit`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
INSERT INTO `attendance` (`student`, `regno`, `week`, `date`,`unit`, `attended`, `id`) VALUES
(‘TED/118/16’, ‘TED/118/16’, ‘1’, ‘2018-01-30’, 2, ‘1’, 1),
(‘COM/016/16’, ‘COM/016/16’, ‘1’, ‘2018-01-30’, 1, ‘1’, 2);
CREATE TABLE IF NOT EXISTS `courses` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(40)