I need to make a while
in PHP :
while($lo = mysql_fetch_array($ro)) {
$id3 = $lo["id"];
$nome_menor = utf8_encode($lo["nome_menor"]);
That's okay! Showing the companies listed in the query below:
$ro = mysql_query("select * from empresa order by nome_menor");
But now I need to make a if
within while
I need the if
check in the checkbox table if the variable name of while
is 1 or 0, I thought of something like this:
$rz = mysql_query("select * from mulempresa where (id_contrato = $id2) ");
$ck1 = mysql_fetch_array($rz,MYSQLI_ASSOC);
$checked = "";
if($ck1[$nome_menor] == 1)
$checked3 = "checked=checked";
But you are giving the following error:
"Notice: Undefined index"
How can I resolve this?