Cada vez que cambio algo me da más errores la página...no se en qué estaré metiendo la pata pero lo que está claro es que `".$fila['id']."`no me lo está reconociendo como el nombre de mi tabla, por la razón que sea =( Este es mi código, he utilizado tu sugerencia del uso in_array (también sin ella y tampoco sale):
Código PHP:
Ver original$query = "SELECT * FROM conectados";
$result = mysql_query("SHOW TABLES FROM `".$fila['id']."`");
$tablas[] = $row[0];
}
echo "</tr>";
echo "<td align = 'center'>";
echo "<form action = 'insertar_contenido1.php' method = 'post' enctype = 'multipart/form-data'>";
echo "<input type = 'file' name = 'cliente[]' multiple/><br/>";
echo '<input type = "hidden" name = "mac_address" value = "'.$fila['id'].'">';
echo '<input type = "hidden" name = "var_id" value = "'.$fila['id'].'" />';
echo '<input type = "hidden" name = "var_MAC" value = "'.$fila['Dispositivos'].'" />';
echo '<input type = "submit" name = "enviar" value = "Subir"/><br/>';
echo "</form>";
echo "</td>";
echo "<td align = 'center'>";
echo "<form action = 'borrar_tabla.php' method = 'post'>";
echo '<input type = "hidden" name = "mac_address" value = "'.$fila['id'].'">';
echo '<input type = "hidden" name = "var_id" value = "'.$fila['id'].'" />';
echo '<input type = "hidden" name = "var_MAC" value = "'.$fila['Dispositivos'].'" />';
echo '<input type = "submit" value = "Borrar" />';
echo "</form>";
echo "</td>";
echo "<td>";
echo "<form action = 'vnc.php' method = 'post'>";
echo '<input type = "hidden" name = "mac_address" value = "'.$fila['id'].'">';
echo '<input type = "submit" value = "Arrancar"/><br/>';
echo "</form>";
echo "</td>";
echo "<td align = 'center'>";
echo "<form action = 'formulario_html.php' method = 'post'>";
echo "<input type = 'submit' name = 'formulario' value = 'Usuario'/><br/>";
echo "</form>";
echo "</td>";
echo "</tr>";
}
}
Estos son los fallos que me da:
Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\Trabajo\phpseleccionar2.php on line 17
Notice: Undefined variable: tablas in C:\xampp\htdocs\Trabajo\phpseleccionar2.php on line 22
Warning: in_array() expects parameter 2 to be array, null given in C:\xampp\htdocs\Trabajo\phpseleccionar2.php on line 22
Notice: Undefined variable: tablas in C:\xampp\htdocs\Trabajo\phpseleccionar2.php on line 22
Warning: in_array() expects parameter 2 to be array, null given in C:\xampp\htdocs\Trabajo\phpseleccionar2.php on line 22
No me sale ni un botón y tras comprobaciones, creo que no entra en nigún bucle... si se te ocurriera algo...muchas gracias de nuevo, y disculpa la insistencia!