Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/08/2008, 10:52
Rockzilla
 
Fecha de Ingreso: julio-2008
Mensajes: 129
Antigüedad: 15 años, 9 meses
Puntos: 0
Problema com combobox, no me muestra lo q selecciono de la opciones del mismo

Hola a todos,

Nuevamente tengo un inconveniente, tengo un combobox que lo llamo de la base de datos pero quiero q al elegir una opcion me muestre la informacion q escogio este es el codigo se acepta todo tipo de ayuda, les recuerdo q mi problema es mostrar la informacion q escoja del combobox

Código PHP:
<?php
$tarea 
$_POST['tarea'];
?>
<p>
<table width="674" height="30" align="center">
  <tr bgcolor="#CCCCCC" class="Estilo1">
  </td>
</p>

<table width="600" align="center">
<tr> 
<td align="left" height="25" valign="top" nowrap><div align="left"><font size="2">
<?php
//Conexion con la base de datos
$link = @mysql_connect ("localhost","root","") or
        die(
"Error de conexion: ".mysql_error());

@
mysql_select_db("name",$link) or
die(
"Error de selección: ".mysql_error());
?>
<form name="form1" method="post" action="actiusuario.php" id="tarea">
<table width="600" align="center">
<tr> 
<td align="left" height="25" valign="top" nowrap><div align="left"></div></td>
</tr>
<tr> 
<td align="left" valign="top" height="25"></td>
<?php
$result
=mysql_query("select id_tabla, tarea from actividades order by tarea");                                                          
echo 
'<select name="tarea" size="1" id="tarea" onChange="javascript:document.form1.submit();">';
echo 
"<option value='0'>___</option>";
while (
$row=mysql_fetch_array($result))
{   
if (
$row['id_tabla'] == $estado){
echo 
"<option value='".$row['id_tabla']."' selected>".$row['tarea']."</option>"

else{
echo 
"<option value='".$row['id_tabla']."'>".$row['tarea']."</option>"
}
}
$tarea1=$tarea1; echo "</select>";
?>
</form>
<FORM ACTION="combito.php" class="Estilo2" id="form1" name="form1" method="post">
<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>
&nbsp;
<table width="513" height="73" border="1" align="center" bordercolor="#000000" bgcolor="#DFDFDF">
  <td width="242"><div align="center">Sistema de Monitoreo y Evaluaci&oacute;n </div></td>
      <td width="135"><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" border="1" align="center" bordercolor="#000000">
  <tr bgcolor="#DFDFDF">
    <td width="191">Nombre de la Tarea </td>
    <td width="311" height="24"><?php echo $row {'actividad'?></td>
  </tr>
</table>
<table width="515" height="171" border="1" align="center" bordercolor="#000000">
    <td width="218" bgcolor="#DFDFDF">Fecha de inicio </td>
    <td width="178" height="28" bordercolor="#000000" bgcolor="#DFDFDF"><p>
    <?php echo $row {'f_i'?></p></td>
    <td width="97" rowspan="6" nowrap bordercolor="#000000" bgcolor="#DFDFDF">&nbsp;</td>
  </tr>
  <tr bgcolor="#CCCCCC" class="Estilo1">
    <td bgcolor="#DFDFDF">Fecha de final </td>
    <td height="24" bordercolor="#000000" bgcolor="#DFDFDF"><?php echo $row {'f_f'?></a></td>
  </tr>
  <tr bgcolor="#CCCCCC" class="Estilo1">
    <td bgcolor="#DFDFDF">Fecha real de culminaci&oacute;n</td>
    <td height="24" bordercolor="#000000" bgcolor="#DFDFDF"><?php echo $row {'f_r'?></a></td>
  </tr>
  <tr bgcolor="#CCCCCC" class="Estilo1">
    <td bgcolor="#DFDFDF">Monto de la actividad </td>
    <td height="24" bordercolor="#000000" bgcolor="#DFDFDF"><?php echo $row {'monto'?></td>
  </tr>
  <tr bgcolor="#CCCCCC" class="Estilo1">
    <td bgcolor="#DFDFDF">Trimestre a Ejecutar </td>
    <td height="31" bordercolor="#000000" bgcolor="#DFDFDF"><?php echo $row {'trimestre'?></td>
  </tr>
  <tr bgcolor="#CCCCCC" class="Estilo1">
    <td bgcolor="#DFDFDF">Unidad de medida: </td>
    <td height="24" bgcolor="#DFDFDF"><?php echo $row {'unidad'?></td>
  </tr>
</table>
</form>
</form>
</form>
</form>

<p></p>