Add time to a schedule

0

Good morning. I have a problem and I hope you can support me.

I have to register a field in the bd let's say with 4 hours and in a field of html we will record a start time of a task, say 4:00 pm in a field type="time" and what I have to do is that when I select a time in the field of html in automatic in another field I get the sum of the 4 hours that I got from the bd.

I hope to be clear and you can support me. Thanks in advance

Database:

CREATE TABLE descripciones(
   idDescripcion INT NOT NULL AUTO_INCREMENT,
   descripcion VARCHAR(50) NOT NULL,
   cantHoras INT NOT NULL,
   PRIMARY KEY (idDescripcion)
);

INSERT INTO 'descripciones'('descripcion', 'cantHoras') VALUES 
('Horario de comida',3);

index.html

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    <input type="time" name="horaInicio" value="06:00">
    <input type="time" name="horaFin">
</body>
</html>

Rn start time the user will set a time to start and automatically will be added the 3 hours end time with the event onChange .

    
asked by Jose Luis Ramirez Arambul 16.10.2018 в 16:59
source

0 answers