I have a problem with my PHP when I pass more than one variable for it to check separated by a 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();
}
}
Give this error:
Parse error: syntax error, unexpected ',', expecting ')'
in C:\xampp\htdocs\newcemp\admin\create\tempo.php on line 41
Am I wrong with the syntax myself? When I put only a normal wheel.