I have to create a condition to check the insertion of a record.
In this insert I have dois inputs type radio
, one with value="Ok"
and one with value="Não Ok"
:
$tabela1 .= '<td style="float:center"> <input type="radio" name= "Sim['.$y.']" value="Ok" required></td>';
$tabela1 .= '<td style="float:center"> <input type="radio" name= "Sim['.$y.']" value="Não Ok" required></td>';
When I insert the record into the database table, it inserts 23 rows. When inserting the 23 lines I want to create a if
that verifies, if it exists in one of the lines when inserting with value="Não Ok"
then the condition is true
, if in the 23 lines receive value="Ok"
then the condition is false
.
I'm doing it this way but it's not working:
if($sim != "Ok"){
....
}else{
....
}
In this way, receive on all 23 lines value="Ok"
or on one or more lines receive value="Não Ok"
the condition is always false
.