
22/05/2004, 13:28
|
| | Fecha de Ingreso: mayo-2004 Ubicación: Barcelona
Mensajes: 200
Antigüedad: 20 años, 10 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> </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> <B>IP</B></TD>
<TD> <B>Etiqueta</B></TD>
<TD> <B>Model</B></TD>
<TD> <B>Connexions</B></TD>
<TD> <B>OS</B> </TD>
</TR>
<?php
while($row = mysql_fetch_array($result))
{
printf("<tr>
<td> %s</td>
<td> %s</td>
<td> %s</td>
<td> %s</td>
<td> %s </td>
</tr>",
$row["ip"],$row["etiqueta"],
$row["model"],$row["connexions"],
$row["os"]);
}
mysql_free_result($result);
mysql_close($link);
?>
</body>
</html>
GRacias!!!!!!! |