Ver Mensaje Individual
  #6 (permalink)  
Antiguo 29/08/2008, 08:32
Rockzilla
 
Fecha de Ingreso: julio-2008
Mensajes: 129
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: Urgente tengo problema con el proceso de cargar informacion de un combobox

asi lo cambia antes me salia este error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\prueba1\combito.php on line 48 pero con ese cambio ya no me sale el mismo, pero sigue igual me muestra la lista desplegable escojo una de las opciones pero no me muestra ningun informacion correspondiente
Código PHP:
<?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="GET"  action="combito_2.php" id="form1">

<select name="combo">
<option>Seleccione</option>
<?php
if(!(isset($_GET['combo'])))
{

$result=mysql_query("select id_tabla, tarea from actividades order by tarea");  

while (
$row=mysql_fetch_array($result))
{   
echo 
"<option value='".$row['id_tabla']."'>".$row['tarea']."</option>" ;
}
}
?>
</select>
<input name='buscar' type='submit' value='Buscar' >
</form>
<?php
 
if(isset($_GET['combo']))
 {
$tarea $_GET['combo'];
echo 
"************************";
echo 
$_GET['combo'];
$row=mysql_fetch_array(mysql_query("select * from  actividades where id_tabla='".$tarea."'"));  
echo 
$row['actividad'];


?>


<table width="513" height="73" border="1" align="center" bordercolor="#000000" bgcolor="#DFDFDF">
  <td width="189"><div align="center">Sistema de Monitoreo y Evaluaci&oacute;n </div></td>
      <td width="182"><div align="center">Dependencia</div></td>
      
    <td width="120"><div align="right">
<div align="right"><?php echo $row['dependencia'?></div> 
</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="191" bgcolor="#DFDFDF">Fecha de inicio </td>
    <td width="183" height="28" bordercolor="#000000" bgcolor="#DFDFDF"><p>
    <?php echo $row {'f_i'?></p></td>
    <td width="119" 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>
<?php
}
?>