9
I have a little problem in my PHP when I step over a variable to check separated by comma it generates a parse error.
Look at my code below:
if (isset($_POST['btnCriaTempo'])){
$ordem = trim($_POST['ordem']);
$timeHours = trim($_POST['tempoHora']);
$timeMinutes = trim($_POST['tempoMinuto']);
$timeSeconds = trim($_POST['tempoSegundo']);
$visao = trim($_POST['visibilidade']);
$momentHours = trim($_POST['momentoHora']);
$momentMinutes = trim($_POST['momentoMinuto']);
$momentSeconds = trim($_POST['momentoSegundo']);
if (!empty($ordem, $visao)){ /*Esta é a linha 41*/
$sqlCriaTempo = "INSERT INTO sv_tempo (tempoTotal, tempoVisao, tempoMomento, tempoOrdem)"
." values (:tempoTotal, :tempoVisao, :tempoMomento, :tempoOrdem)";
$queryCriaTempo = $conecta->prepare();
}
}
Makes that mistake:
Parse error: syntax error, unexpected ',', expecting ')'
in C:\xampp\htdocs\newcemp\admin\create\tempo.php on line 41
Am I the one making the syntax wrong? When I put only a normal wheel.
I believe that the
empty()
does not support variable variables such asisset()
.– rray