Need a "cannot select the timing before/after selected timing"javascript validation (other other validation) for a developed PHP and MySQL booking system.
For example, all the timings on each day are grab from the MySQL database.
30 Sep 2008
==========
[ ] 0900 - 1000
[ ] 0930 - 1030
[ ] 1000 - 1100
[ ] 1030 - 1130
If i select 0930 - 1030 and 0900 - 1000, there should be a validation that prompts me that I can only select one timing. please take note that i CAN select 0900 - 1000 AND 1000 - 1100 because there is no overlapping.
please do not suggest radio button, because we need to use checkboxes to present multiple days
## Deliverables
Please see attached [login to view URL] file where the javascript validation must be in. It should be able to work on this file.
Please ensure that it MUST BE COMPATIBLE WITH PHP v4.
This should be only a simple javascript validation required. Please ensure u understand the requirements first before u bid.
===========================
Timeslot database is something like this:
CREATE TABLE `timeslot` (
`id` int(11) NOT NULL auto_increment,
`ins_id` int(11) NOT NULL,
`teach_id` int(11) NOT NULL,
`date` date NOT NULL,
`timeFrom` time NOT NULL,
`timeTo` time NOT NULL,
`timeFrom2` int(11) NOT NULL,
`timeTo2` int(11) NOT NULL,
`price` decimal(15,4) NOT NULL default '100.0000',
`status` int(2) NOT NULL default '1',
`stock` int(11) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=79 DEFAULT CHARSET=latin1 AUTO_INCREMENT=79 ;
--
-- Dumping data for table `timeslot`
--
INSERT INTO `timeslot` (`id`, `ins_id`, `teach_id`, `date`, `timeFrom`, `timeTo`, `timeFrom2`, `timeTo2`, `price`, `status`, `stock`) VALUES
(1, 2, 2, '2008-09-15', '02:00:00', '06:00:00', 50400, 64800, 100, 1, 0),
(2, 2, 2, '2008-09-22', '02:00:00', '06:00:00', 50400, 64800, 100, 1, 0),
(3, 2, 2, '2008-09-29', '02:00:00', '06:00:00', 50400, 64800, 100, 1, 0),
(4, 2, 2, '2008-10-06', '02:00:00', '06:00:00', 50400, 64800, 100, 1, 0),