Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/06/2014, 02:36
Avatar de Eleazan
Eleazan
 
Fecha de Ingreso: abril-2008
Ubicación: Ibiza
Mensajes: 1.879
Antigüedad: 16 años, 10 meses
Puntos: 326
Respuesta: Relación de variables

Bueno, te lo voy a dar mucho más mascadito:

Código PHP:

$result 
mysql_query("SHOW TABLES FROM $dbname");

while(
$row mysql_fetch_row($result)) 
{
    
$tablas[] = $row[0];
}  

$query "SELECT * FROM conectados";
$resultado mysql_query($query);
 
while(
$fila mysql_fetch_array($resultado)){
 
    if( 
in_array($fila['id'], $tablas)) echo 'LA TABLA YA EXISTE';
    echo 
"<form action = 'crear_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 = "Crear" />';
    echo 
"</form>";


__________________
>> Eleazan's Source
>> @Eleazan