Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $x = $_POST['job'];
- $i = 0;
- foreach($x as &$key){
- $job = $_POST['job'][$i];
- $hora = $_POST['hora'][$i];
- if(!empty($job)) {
- $z = 0;
- foreach($job as &$tab) {
- $meujob = $tab[$z];
- $sql = mysqli_query($con, "select * from tabela_horarios where id_horario = '$hora'");
- $vetor = mysqli_fetch_array($sql);
- $datetime = date($data.' '.$vetor['horainicio']);
- $datetime1 = date($data.' '.$vetor['horafim']);
- $sql_grava = mysqli_query($con, "insert into tabela_horario_usuario (id_usuario, id_job, id_dia, id_horario, dia, start, end) VALUES ('$responsavel', '$meujob', '$id_dia', '$hora', '$data', '$datetime', '$datetime1')");
- $sql_atualiza = mysqli_query($con, "update marketing SET producao = '2' where id_marketing = '$meujob'");
- $z++;
- }
- }
- $i++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement