Foros del Web » Programando para Internet » PHP »

Menus desplegables con php y mysql

Estas en el tema de Menus desplegables con php y mysql en el foro de PHP en Foros del Web. Hola a todos los de foro, saben tengo un problema y quisiera ver si alguien me puede ayudar... Tengo dos menus desplegables que funcionan de ...
  #1 (permalink)  
Antiguo 31/10/2006, 17:31
 
Fecha de Ingreso: marzo-2006
Ubicación: Veracruz
Mensajes: 33
Antigüedad: 18 años, 1 mes
Puntos: 0
Pregunta Menus desplegables con php y mysql

Hola a todos los de foro, saben tengo un problema y quisiera ver si alguien me puede ayudar...

Tengo dos menus desplegables que funcionan de la siguiente manera:
************************************************** ********
<html>
<head>
<title>Selecciona Años...</title>
</head>
<body>
<font color="#006699"> <h3>Seleccionar Años:</h3> </font>
<hr>
<form method="post" action="selmeses.php">
<table bgcolor="#dfdfdf">
<tr>
<td align="right">Años:</td>
<td>
<?
//Conexion con la base
mysql_connect("localhost","ct_intranet","intranet" );
//Creamos la sentencia SQL y la ejecutamos
$sSQL="Select num_año From año Order By num_año";
$result=mysql_db_query("bdintranet",$sSQL);
?>

<select name="num_año">

<?
//Generamos el menu desplegable

while ($row=mysql_fetch_array($result))
{
echo '<option>'.$row["num_año"];
}
?>
</select>
</td>
</tr>

</tr>

<tr>
<td> </td>
<td align="right"><input type="submit" value="Archivos..."></td>
</tr>
</table>
</form>
</body>
</html>
************************************************** *******
<html>
<head>
<title>Seleccionar el mes...</title>
</head>
<body>
<font color="#006699"> <h3>Seleccionar el mes</h3> </font>
<?
$num_año=$_POST['num_año'];
$nom_mes=$_POST['nom_mes'];

if($num_año=='2005')
{
//Conexion con la base
mysql_connect("localhost","ct_intranet","intranet" );
?>

<FORM METHOD="POST" ACTION="descar2005.php">
<table bgcolor="#dfdfdf" cellpadding="5">
<tr>
<td align="right">Meses:</td>
<td>
<?
$num_mes=$_POST['num_mes'];

//Creamos la sentencia SQL y la ejecutamos
$sSQL="Select num_mes from mes,año
where id_año=1 &&
id_mes=1 ";

$result=mysql_db_query("bdintranet",$sSQL);
?>
<select name="num_mes">

<?
//Generamos el menu desplegable
while ($row=mysql_fetch_array($result))
{
echo '<option>'.$row["num_mes"];
}
?>
</select>
</td>
</tr>

<tr>
<td> </td>
<td align="left"><input type="submit" value="Ver Ficha..."></td>
</tr>
</table>
</form>
<?
}
************************************************** ********

Quiero seleccionar los meses por año, kisiera saber como le puedo hacer para que esto funcione de la manera que lo necesito.. tengo un codigo pero lo en todos se los mando para que lo vean..


<html>
<head>
<title>Descarga de archivos por contrato</title>
</head>

<body>
<table border="1" bgcolor="#cc3300">
<tr>
<td>
<font color="#ffffff">
<div align="justify">
<b>
<?
$nom_mes=$_POST['nom_mes'];
$respres=$_POST['respres'];
echo $nom_mes;
?>
</b>
</div>
</font>
</td>
</tr>
</table>

<br>
<table border="1" bgcolor="#006699">

<table border="1" bgcolor="#dfdfdf">
<tr>
<td>&nbsp;Descripcción de Archivo</td>
<td>&nbsp;Nombre de Archivo</td>
<td>&nbsp;Tipo de Aplicación</td>
<td>&nbsp;Acción</td>
</tr>

<?
///////////ARCHIVOS DE PRESENTACIONES
echo '<font color="#cc3300"> <h4> Archivos Presentacion y Minutas </h4> </font>';
//listar_archivos de reporte diario
mysql_connect("localhost","ct_intranet","intranet" );
$respres=mysql_db_query("bdintranet","select * from presentacion");

while($fila = mysql_fetch_array($respres))
{
print "<tr>
<td>$fila[tit_presen]</td>
<td>$fila[nom_presen]</td>
<td>($fila[tipo_presen])</td>
<td><a href='despres.php?id=$fila[id_presen]'>Descargar</a></td>
</tr>";
}
?>
</table>
</body>
</html>

************************************************** ********
Espero y alguien me pueda ayudar , de antemano les doy las gracias
__________________
:corazon: [B]Betty[/B]
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:13.