Tema: editar form
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/10/2010, 13:34
aprendiz88
 
Fecha de Ingreso: agosto-2010
Mensajes: 62
Antigüedad: 14 años, 5 meses
Puntos: 0
editar form

Hola buen dia a todos

Tengo un formualrio el cual quiero editar, ya hice las consultas y las ejecuta en el sql y están bien, pero al momento de correrlo en la pantalla no me muestra la información, podrían ver mi código y checar que este bien.

Código PHP:
<?php 

if($_GET['cas']==1)
{
     
mysql_query("Update tblcommentstatus join tblstatus on (tblstatus.caso=tblcommentstatus.idcaso)  set comunicado_publico='".$_POST['comunicado_publico']."',notas='".$_POST['notas']."' where caso='".$_GET['select']."'");
     
echo 
"<br>";
echo 
"<center>";     
echo 
"\nLos datos se editaron correctamente";     
echo 
"</center>";    
 
 }
else
{}

 
$prue=mysql_query("SELECT comunicado_publico,notas FROM tblcommentstatus join tblstatus on(tblstatus.caso=tblcommentstatus.idcaso) where caso='".$_GET['select']."'");
 
$regi mysql_fetch_array($prue); 
 
?>
 
</p>
<table  width="787"  align="center" >
  <td width="802" height="38">
<h1 align="center" class="blue" ><em><strong>Editar comentario</strong></em></h1></td>
</table>
<br />
<table  cellpadding="2" align="center" bordercolorlight="#DADADA">
  <form action="<?=$PHP_SELF?>?cas=1&select=<?=$_GET['select']?>" method="post">
  <tr>
    <td width="124" height="40"><p align="right">Comunicado público:</td>
    <td width="210"></p>
        <textarea name="comunicado_publico" cols="70" rows="10" ><?=$regi['comunicado_publico']?></textarea></td>
  </tr>
  <tr>
  <td align="right"><p>Notas:</p></td>
  <td>
  <textarea name="notas" cols="70" rows="10" ><?=$regi['notas']?></textarea>
  </td>
  </tr>
  <tr>
  <td height="57"> <p align="right">&nbsp;</p></td>
    <td>   
      <div align="center">
      <input type=submit name="editar" value= 
    "Guardar" onclick="location.href='index.php'" />
      <input type="button" name="cancelar" value="Cancelar" onclick="location.href='index.php'"/>
      <input type=reset value="Borrar" />
      </div> </td>    
  </tr>  
</form>
</table>
</div>

Si tienen añgún comentario o sugerencia se los agradecere.

Saludos