I\'m trying to use PHP to pass HTML form data to a MYSQL db and return the data to the browser. By submitting checked permissions (M1,
The below code is a more clean way of doing things. Its been a long time since I used it in this way, but it might help you solve your problem since its probably because you use a queryloop in a queryloop. (not sure but wouldn't hurt if you do it like I did.
$permissions = Array();
$query = mysql_query("SELECT * FROM permissions WHERE m LIKE '" . $_POST['M1'] . "' OR m LIKE '" . $_POST['M2'] . "' OR mn LIKE '" . $_POST['MN1'] . "' ");
if ($query) {
while ($row = mysql_fetch_assoc($query)) {
array_push($permissions, $row);
}
}
foreach ($permissions AS $key => $permission) {
$query = mysql_query("SELECT name_surname FROM instruktorzy WHERE instruktor_id='" . $permission['instruktor_id'] . "'");
if ($query) {
while ($row = mysql_fetch_assoc($query2)) {
echo " ".$Mdwa['name_surname']."
" ; "
" ;
}
}
}