I can not do UPDATE on my table

1

Good afternoon, I'm developing an online tagging site, and in the admin part where it controls the schedules of the table I had created a field that can make change at the time of the table ... where that table is shown to the user where he can see what timetables are available. In this field I created for the administrator to be able to change is not working, it does not show me any error, and when I click the button to end, there are no changes in the database ... you can see that I get the id and put the schedule he wants to change, since each day of the week has a table, (second table, third table, fourth table, and so on). My problem is that it does not undergo any changes when I give UPDATE

alter.php code

<?php
$idSeg = filter_input(INPUT_GET, "id-segunda");
$seg = filter_input(INPUT_GET, "seg");

$idTerca = filter_input(INPUT_GET, "id-ter");
$tercaa = filter_input(INPUT_GET, "ter");


$idQuarta = filter_input(INPUT_GET, "id-quarta");
$quartaa = filter_input(INPUT_GET, "qua");


$idQuinta = filter_input(INPUT_GET, "id-quinta");
$quintaa = filter_input(INPUT_GET, "qui");

$idSexta = filter_input(INPUT_GET, "id-sexta");
$sextaa = filter_input(INPUT_GET, "sex");

$idSabado = filter_input(INPUT_GET, "id-sabado");
$sabadoo = filter_input(INPUT_GET, "sab");


include("conexao.php");

if($idSeg && $seg && $idTerca && $tercaa && $idQuarta && $quartaa &&
     $idQuinta && $quintaa && $idSexta && $sextaa && $idSabado && $sabadoo ) {

    if($link) {
    $segg = mysqli_query($link, "UPDATE horas_segunda set horas_de_segunda='$seg' where id='$idSeg';");
    $terc = mysqli_query($link, "UPDATE horas_terca set horas_de_terca='$tercaa' where id='$idTerca';");
    $quarr = mysqli_query($link, "UPDATE horas_quarta set horas_de_quarta='$quartaa' where id='$idQuarta';");
    $quinn = mysqli_query($link, "UPDATE horas_quinta set horas_de_quinta='$quintaa' where id='$idQuinta';");
    $sexx = mysqli_query($link, "UPDATE horas_sexta set horas_de_sexta='$sextaa' where id='$idSexta';");
    $sabaa = mysqli_query($link, "UPDATE horas_sabado set horas_de_sabado='$sabadoo' where id='$idSabado';");

    header("Location: ../Adm/AdmAgenda.php");
 }
    else {
    die("Erro: " .mysqli_error($link));
 }
}

?>

html code

<?php include("../php/agenda.php"); include("../php/alterar.php"); include("../php/HorasDisponivel.php") ?>


<!DOCTYPE html>
<html lang="pt-br" ng-app="AngularADM">
<head>
    <meta charset="utf-8">
    <title>Administração</title>
    <link rel="stylesheet" type="text/css" href="../css/visual.css">
    <!-- responsivo -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/bootstrap.css" rel="stylesheet">
    <link href="../css/bootstrap-theme.css" rel="stylesheet">
    <link href="../css/bootstrap-theme.css.map" rel="stylesheet">
    <link href="../css/bootstrap-theme.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    <script src="../js/jqueryAtualizado.js"></script>
    <script src="../js/jqueryAtualizado.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script><scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <script src="../js/bootstrap.min.js"></script>
    <!-- Fim responsivo -->
    <script src="../js/angular.min.js"></script>
</head>

<body ng-controller="TempoHorasP1">
    <header id="header">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="block-left">
                        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                            <div class="container-fluid">
                                <div class="navbar-header">
                                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                                        <span class="sr-only">toggle navigation</span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                    </button>
                                    <div class="nav-logo col-md-8 righ-menu">
                                        <img src="../Imagens/logo-branco.png" alt="Studio 7 Hair">
                                    </div>
                                </div>

                                <div class="collapse navbar-collapse col-md-4" id="bs-example-navbar-collapse-1">
                                    <ul class="nav navbar-nav">
                                        <li class="active"><a href="AdmAgenda.php" class="item-menu-adm"><span>Seja bem vindo</span></a></li>
                                        <li><a class="item-menu-adm"><span>Configuração da Agenda</span><span class="sr-only">(current)</span></a></li>
                                        <li><a href="cadastro.html" class="item-menu-adm"><span>Cadastrar Administrador</span><span class="sr-only">(current)</span></a></li>
                                        <li><a href="https://www.miyomic.com.br" class="item-menu-adm"><span>Solicitar Ajuda</span></a></li>

                                    </ul>
                                </div>
                            </div>
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </header>
    <div class="container">
        <div class="row">
            <h2 class="dourado texto-centro margin-top30 bold">Configuração da agenda online</h2>
        </div>
        <div class="form-alterar margin-top40 texto-centro">
            <h3 class="margin-top20 dourado">Área de alteração dos horários</h3>
            <div class="row">
                <div class="col-lg-3 texto-centro bloco-hora-alte">
                    <p>Segunda feira</p>

                    <form action="../php/alterar.php" name="segunda">
                        <div class="col-lg-6">
                            <input type="text" name="id-segunda" class="campo-alteracao" placeholder="Id" />
                        </div>

                        <div class="col-lg-6">
                            <input type="text" name="seg" class="campo-alteracao" placeholder="Horas" />
                        </div>

                        <br />

                        <div class="botao-edit">
                            <a class="botao-alterar">
                                <span class="glyphicon glyphicon-floppy-saved"></span>
                                <input type="submit" class="invisivel" value="Alterar" />
                            </a>
                        </div>
                    </form>
                </div>

                <div class="col-lg-3 texto-centro bloco-hora-alte">
                    <p>Terça feira</p>

                    <form action="../php/alterar.php" name="terca">
                        <div class="col-lg-6">
                            <input type="text" name="id-ter" class="campo-alteracao" placeholder="Id" />
                        </div>

                        <div class="col-lg-6">
                            <input type="text" name="ter" class="campo-alteracao" placeholder="Horas" />
                        </div>

                        <br />

                        <div class="botao-edit">
                            <a class="botao-alterar">
                                <span class="glyphicon glyphicon-floppy-saved"></span>
                                <input type="submit" class="invisivel" value="Alterar" />
                            </a>
                        </div>
                    </form>
                </div>

                <div class="col-lg-3 texto-centro bloco-hora-alte">
                    <p>Quarta feira</p>

                    <form action="../php/alterar.php" name="quarta">
                        <div class="col-lg-6">
                            <input type="text" name="id-quarta" class="campo-alteracao" placeholder="Id" />
                        </div>

                        <div class="col-lg-6">
                            <input type="text" name="qua" class="campo-alteracao" placeholder="Horas" />
                        </div>

                        <br />

                        <div class="botao-edit">
                            <a class="botao-alterar">
                                <span class="glyphicon glyphicon-floppy-saved"></span>
                                <input type="submit" class="invisivel" value="Alterar" />
                            </a>
                        </div>
                    </form>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-3 texto-centro bloco-hora-alte">
                    <p>Quinta feira</p>
                    <form action="../php/alterar.php" name="quinta">
                        <div class="col-lg-6">
                            <input type="text" name="id-quinta" class="campo-alteracao" placeholder="Id" />
                        </div>

                        <div class="col-lg-6">
                            <input type="text" name="qui" class="campo-alteracao" placeholder="Horas" />
                        </div>

                        <br />

                        <div class="botao-edit">
                            <a class="botao-alterar">
                                <span class="glyphicon glyphicon-floppy-saved"></span>
                                <input type="submit" class="invisivel" value="Alterar" />
                            </a>
                        </div>
                    </form>
                </div>

                <div class="col-lg-3 texto-centro bloco-hora-alte">
                    <p>Sexta feira</p>

                    <form action="../php/alterar.php" name="sexta">
                        <div class="col-lg-6">
                            <input type="text" name="id-sexta" class="campo-alteracao" placeholder="Id" />
                        </div>

                        <div class="col-lg-6">
                            <input type="text" name="sex" class="campo-alteracao" placeholder="Horas" />
                        </div>

                        <br />

                        <div class="botao-edit">
                            <a class="botao-alterar">
                                <span class="glyphicon glyphicon-floppy-saved"></span>
                                <input type="submit" class="invisivel" value="Alterar" />
                            </a>
                        </div>
                    </form>
                </div>

                <div class="col-lg-3 texto-centro bloco-hora-alte">
                    <p>Sabádo feira</p>

                    <form action="../php/alterar.php" name="sabado">
                        <div class="col-lg-6">
                            <input type="text" name="id-sabado" class="campo-alteracao" placeholder="Id" />
                        </div>

                        <div class="col-lg-6">
                            <input type="text" name="sab" class="campo-alteracao" placeholder="Horas" />
                        </div>

                        <br />

                        <div class="botao-edit">
                            <a class="botao-alterar">
                                <span class="glyphicon glyphicon-floppy-saved"></span>
                                <input type="submit" class="invisivel" value="Alterar" />
                            </a>
                        </div>
                    </form>
                </div>
            </div>
            <div class="alert alert-danger" role="alert">Para poder ter sucesso na alteração da agenda terá que ver qual id que deseja para poder selecionar</div>
        </div>
    </div>
</body>
</html>

If someone can help me, I'm grateful ...

    
asked by anonymous 12.03.2017 / 21:27

1 answer

0

Your error is logic, here:

if($idSeg && $seg && $idTerca && $tercaa && $idQuarta && $quartaa &&
     $idQuinta && $quintaa && $idSexta && $sextaa && $idSabado && $sabadoo ) {
.
.

The Excerpt will only run if all variables are true, check the condition you want to make the corrections better. p>     

12.03.2017 / 21:40