0
I wanted it on condition whenever the input text
is equal to an off value input radio
, but always returns error 500 when running on the page:
$y = 0;
while($rows_cursos = mysqli_fetch_array($resultado_cursos)) {
$property = ($rows_cursos["Descricao"] === "1 Desinfetante de Surpeficies" || $rows_cursos["Descricao"] === "Saco/Caixa c/ Cotonetes") : "disabled" ? "required";
$tabela1 .= '<tr>';
$tabela1 .= '<td> <input type="text" readonly="true" size="20" name= "Produto['.$y.']" class= "Produto" value="'.$rows_cursos['Descricao'].'"></td>';
$tabela1 .= '<td> <input type="radio" name= "DataP['.$y.']" value="Ok" '.$property.'></td>';
$tabela1 .= '<td> <input type="radio" name= "DataP['.$y.']" value="Não Ok" '.$property.'></td>';
$tabela1 .= '</tr>';
$y++;
}
This code works without the ternary operator?
– Bruno Romualdo
@Bruno Romualdo yes it works, the problem is when I add
:"disabled"?"required"
– Bruno
do not forget to mark an answer as correct, and I advise that while learning something new always research and write the code yourself so that you record better and can help others when they need it.
– Bruno Romualdo