Ver Mensaje Individual
  #9 (permalink)  
Antiguo 20/08/2013, 13:39
fenriques123
 
Fecha de Ingreso: julio-2012
Mensajes: 11
Antigüedad: 11 años, 9 meses
Puntos: 0
Información Respuesta: Problemas para actulaizar

Esre es el archivo forModPlanPro.php

<p>
<?php

include("conexion.php");
$cod_pla=$_REQUEST['cod_pla'];
mysql_select_db("cayaurima")or die("Base de datos no existente");
$consulta="SELECT * FROM plantel_pro where cod_pla=". $_REQUEST['cod_pla'];
$resultado=mysql_query($consulta,conexion);
$fila=mysql_fetch_array($resultado)

?>
</p>
<p align="center">&nbsp;</p>

<form id="form1" name="form1" method="post" action="modPlaPro.php?cod_pla=<?php echo $_REQUEST['cod_pla'];?>">
<table width="507" border="1" align="center">
<tr>
<th width="218" scope="col">CODIGO DEL PLANTEL </th>
<th width="273" scope="col"><label>
<input name="cod_pla" type="text" id="cod_pla" value="<?php echo $fila['cod_pla'];?>" size="40" />
</label></th>
</tr>
<tr>
<td><div align="center"><strong>NOMBRE DEL PLANTEL </strong></div> <div align="center">
<label></label>
</div></td>
<td><div align="center">
<label>
<input name="nombre" type="text" id="nombre" value="<?php echo $fila['nombre'];?>" size="40" />
</label>
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<label>
<input type="submit" name="Submit" value="Actualizar" />
</label>
</div></td>
</tr>
</table>

<p align="center"></p>
<p>&nbsp;</p>
</form>

<p>&nbsp;</p>


y en la linea 32 tenia esto $resultado=mysql_query($consulta);

me daba este error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\licay\forModPlanPro.php on line 33


y se lo cambie por esto $resultado=mysql_query($consulta,conexion);

y ahora me salen estos dos errores

Warning: mysql_query() expects parameter 2 to be resource, string given in C:\AppServ\www\licay\forModPlanPro.php on line 32

mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\licay\forModPlanPro.php on line 33

el de la inea 33 ya me salía antes de hacerle el cambio.