Foros del Web » Programando para Internet » PHP »

com puedo seleccionar - todos en un select con consulta mysql

Estas en el tema de com puedo seleccionar - todos en un select con consulta mysql en el foro de PHP en Foros del Web. Hola salu2 otra vez. bien tengo una pequeña pregunta. como puedo hacer para que en un combobox en donde hay una consulta hacia una tabla ...
  #1 (permalink)  
Antiguo 05/02/2008, 12:33
Avatar de lobonegro6  
Fecha de Ingreso: enero-2005
Ubicación: Monterrey, México.
Mensajes: 145
Antigüedad: 19 años, 3 meses
Puntos: 1
com puedo seleccionar - todos en un select con consulta mysql

Hola salu2 otra vez.

bien tengo una pequeña pregunta. como puedo hacer para que en un combobox en donde hay una consulta hacia una tabla de usuarios, en la cual se muestra usuario por usario. exista una opcion que pueda tomar todos los usarios de esa consulta?. aqui dejo el script q estoy usando;

Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="./js/calendar/calendar-win2k-1.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Calendario</title>
<script src="./js/calendar/calendar.js" type="text/javascript"></script>
<script type="text/javascript" src="./js/calendar/lang/calendar-es.js"></script>
<script type="text/javascript" src="./js/calendar/calendar-setup.js"></script>
</head>
<?php include ("conexion.php"); ?>
<body>

<form action="esp_editar.php" method="get">
<table class='list'>
  <tr>
    <td width="23%">Fecha Recepcion:</td>
    <td width="9%"><div align="right">Entre</div></td>
    <td width="29%"><input type="text" id="txtFechaInicio" name="txtFechaInicio" /></td>
    <td width="4%"><img src="http://www.forosdelweb.com/images/iCalendar.gif" id="bdFechaI" /></td>
    <td width="2%">y</td>
    <td width="29%"><input type="text" id="txtFechaFin" name="txtFechaFin"  /></td>
    <td width="4%"><img src="http://www.forosdelweb.com/images/iCalendar.gif" id="bdFechaII" /></td>
  </tr>
  <tr>
    <td>Recurso Progress: </td>
    <td><div align="left"><select select name="p_toquest" id="p_toquest">
        <?php
            $c_rprogress_cal 
"SELECT * FROM desarrolladores";
            
$r_rprogress_cal mysql_query($c_rprogress_cal);
            if(!
$r_rprogress_cal) {
                
$message  'Query Invalido: ' mysql_error() . "\n";
                
$message .= 'Query Completo: ' $r_rprogress_cal;
                die(
$message);
            }
            
            while (
$ren_rprogress_cal mysql_fetch_array($r_rprogress_cal)) { ?>
            <option value="<? echo $ren_rprogress_cal['id_desarrolladores']; { ?>"><? echo $ren_rprogress_cal['desarrolladores']; { ?></option>
            <? } } } ?>
    </select></div>
    </td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><div align="right"><input type="submit" name="accion" value="Filtrar" /></div></td>
    <td>&nbsp;</td>
  </tr>
  </form>
</table>

<script type="text/javascript">
Calendar.setup({
          inputField  : "txtFechaInicio",  // id of the input field
          ifFormat    : "%Y-%m-%d",      // format of the input field
          button      : "bdFechaI", // trigger for the calendar (button ID)
          align       : "Tr",            // alignment (defaults to "Bl")
          singleClick :  true, 
          weekNumbers : false
        });
        
Calendar.setup({
            inputField    : "txtFechaFin",    // id of the input field
            ifFormat    : "%Y-%m-%d",        // format of the input field
            button        : "bdFechaII",        // trigger for the calendar (button ID)
            align        : "Tr",                // alignment (defaults to "B1")
            singleClick : true,
            weekNumbers : false
        });    
</script>
</body>
</html>
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 09:37.