Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/05/2004, 13:28
fido85
 
Fecha de Ingreso: mayo-2004
Ubicación: Barcelona
Mensajes: 200
Antigüedad: 19 años, 11 meses
Puntos: 0
Joel...este es el codigo
a ver si me puedes hechar un cable....o alguien q me pueda ayudar

lo q pretendo es q un usuario seleccione la opcion deseada y salga una consulta...

<html>
<head>
<title>Estadistiques</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<p><strong><font face="Arial">Departaments
<select name="dep" id=dep>
<option>dai</option>
<option>Informatica</option>
<option>Secretaria</option>
<option>Telecos</option>
<option>Administrativo</option>
<option>Comercio</option>
</select>
</font></strong></p>
<p>&nbsp;</p>
<hr><br>
<?php
$ubi=$_GET['dep'];
include("conex.phtml");
$link=Conectarse();
$result=mysql_query("select ip,etiqueta,model,connexions,os from ordinadors where ubicacio='".$ubi."'",$link);
?>

<TABLE BORDER=1 align="center" CELLPADDING=1 CELLSPACING=1>

<TR>
<TD>&nbsp;<B>IP</B></TD>
<TD>&nbsp;<B>Etiqueta</B></TD>
<TD>&nbsp;<B>Model</B></TD>
<TD>&nbsp;<B>Connexions</B></TD>
<TD>&nbsp;<B>OS</B>&nbsp;</TD>
</TR>

<?php

while($row = mysql_fetch_array($result))
{
printf("<tr>
<td>&nbsp;%s</td>
<td>&nbsp;%s</td>
<td>&nbsp;%s</td>
<td>&nbsp;%s</td>
<td>&nbsp;%s&nbsp;</td>
</tr>",
$row["ip"],$row["etiqueta"],
$row["model"],$row["connexions"],
$row["os"]);
}
mysql_free_result($result);
mysql_close($link);
?>
</body>
</html>

GRacias!!!!!!!