Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/08/2008, 07:50
Rockzilla
 
Fecha de Ingreso: julio-2008
Mensajes: 129
Antigüedad: 15 años, 10 meses
Puntos: 0
problema con los combobox directamente de mi base de datos

hola saludos a todos tengo un inconveniente soy nuevo en esto y espero que me ayuden en lo que puedan, al final le mostrare mi codigo que el hace un llamado de la base de datos y me muestra los campo correspondiente pero lo hace atra vez de un campo de texto es decir si el usuario coloca un codigo de actividad muestra la informacion como tal pero quisiera saber si existe la posibilidad de cargarlo automaticamente de un combobox para que el usuario no tenga problema con los codigos de actividades aqui le muestro mi codigo completo
Código PHP:
 <?php
include ('connection1.php');
$tarea $_POST['tarea'];
$query="select * from actividades where tarea ='$tarea'";
$bus mysql_query($query,$link) or die("Error en query $query:" .mysql_error());
$row mysql_fetch_array($bus);
?>
<HTML>
<TITLE>Actividades</TITLE>
<p class="Estilo4">
  </HEAD>

  <?php CabeceraPagina(); ?>
  <table width="674" height="30" align="center">
      <tr bgcolor="#CCCCCC" class="Estilo1">
        <td width="90">Cod Tarea </td>
        <td width="87" height="24">
<form name="form1" method="post" action="actiusuario.php">
<input name="tarea" type="text" id="tarea">
<input name="bus" type="submit" id="bus" value="Buscar">
</form>
<form action="" name="form1" method="get">
<FORM ACTION="procesaactividad.php" class="Estilo2" id="form1" name="form1">
<form id="form1" name="form1" method="post" action="procesaactividad.php">
    <label>
    </label>
    <form method="post" action="procesaactividad.php">&nbsp;</td>
        <td width="481" bgcolor="#FFFFFF">&nbsp;</td>
      </tr>

    <table width="23" height="26" align="center">
      <tr bgcolor="#CCCCCC" class="Estilo1">
        <td width="15" height="20" bgcolor="#FFFFFF" class="pi">&nbsp;</td>
      </tr>
    </table>
    <table width="533" border="0" align="center">
      <tr>
        <th width="555" height="572" scope="col"><table width="513" height="73" align="center">
            <tr bgcolor="#CCCCCC" class="Estilo1">
              <td width="253"><div align="center">Sistema de Monitoreo y Evaluaci&oacute;n </div></td>
              <td width="124"><div align="center"></div>                <div align="center">Dependencia</div></td>
              <td width="120"><div align="right"><?php echo $row {'dependencia'?></div></td>
            </tr>
            
          </table>
            <table width="514" height="30" align="center">
              <tr bgcolor="#CCCCCC" class="Estilo1">
                <td width="191">Nombre de la Tarea </td>
                <td width="311" height="24"><?php echo $row {'actividad'?></td>
              </tr>
            </table>
          <table width="515" height="164" align="center">
              <tr bgcolor="#CCCCCC" class="Estilo1">
                <td width="218">Fecha de inicio </td>
                <td width="184" height="28"><p><!-- ggPosX and ggPosY not set, so popup will autolocate to the right of the graphic -->
                    <?php echo $row {'f_i'?></p></td>
                <td width="97" rowspan="6" nowrap bordercolor="#FFFFFF">&nbsp;</td>
              </tr>
              <tr bgcolor="#CCCCCC" class="Estilo1">
                <td>Fecha de final </td>
                <td height="24"><!-- ggPosX and ggPosY not set, so popup will autolocate to the right of the graphic --><!-- ggPosX and ggPosY not set, so popup will autolocate to the right of the graphic -->
                  <a href="javascript:show_calendar('form1.f_f');" onMouseOver="window.status='Elige fecha'; overlib('Pulsa para elegir fecha del mes actual en el calendario del Sistema de Monitoreo.'); return true;" onMouseOut="window.status=''; nd(); return true;"><?php echo $row {'f_r'?></a></td>
              </tr>
              <tr bgcolor="#CCCCCC" class="Estilo1">
                <td>Fecha real de culminaci&oacute;n</td>
                <td height="24"><!-- ggPosX and ggPosY not set, so popup will autolocate to the right of the graphic -->
                  <a href="javascript:show_calendar('form1.f_r');" onMouseOver="window.status='Elige fecha'; overlib('Pulsa para elegir fecha del mes actual en el calendario del Sistema de Monitoreo.'); return true;" onMouseOut="window.status=''; nd(); return true;"><?php echo $row {'f_r'?></a></td>
              </tr>
              <tr bgcolor="#CCCCCC" class="Estilo1">
                <td>Monto de la actividad </td>
                <td height="24"><?php echo $row {'monto'?></td>
              </tr>
              <tr bgcolor="#CCCCCC" class="Estilo1">
                <td>Trimestre a Ejecutar </td>
                <td height="24"><?php echo $row {'trimestre'?></td>
              </tr>
              <tr bgcolor="#CCCCCC" class="Estilo1">
                <td>Unidad de medida: </td>
                <td height="24"><?php echo $row {'unidad'?></td>
              </tr>
          </table>
          <p>&nbsp;</p>
          <?php
$num1
=$_GET["c"];
$total = ($num1/40)*100;

?>
          <table width="518" border="1" align="center">
                      <tr>
                        <td width="207"><font size="1">
                          <input size=10 name=c value="<?php echo "$num1"?>">
                        porcentaje de 40</font></td>
                        <td width="127"><font size="1">
                          =
                          <input name=total value="<?php echo "$total"?>" size=10>
                        %</font></td>
                        <td width="99"><font size="1">
                          <input name="button" type=submit value=Calculo>
                        </font></td>
                        <td width="57" bgcolor="<?php if($total<=45){ echo "red"; } else if($total<=75){ echo "yellow"; }  else if($total<=100){ echo "green"; } ?>"><?php  echo $_GET[d]."       " ?>&nbsp;</td>
                    </tr>
          </table>   

<font face="Arial, Helvetica, sans-serif" size="2">
  <!-- Begin Nedstat Basic code -->
  <!-- Title: ArgentinaNet.com.ar -->
  <!-- URL: http://www.argentinanet.com.ar/head.htm -->
</font><BR>
<BR>
        </BODY></HTML>&nbsp;          </p>
          <p>
            <input type="submit" value="Incluir" name="B1">
            </p>
          </p>
          <p>
              <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24">
                <param name="BGCOLOR" value="">
                <param name="movie" value="button6.swf">
                <param name="quality" value="high">
                <embed src="button6.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="103" height="24" ></embed>
              </object>
        </p></th>
      </tr>
  </table>
    <p><a href="usuario2.php">
    <?php PiePagina(); ?></a></p>