Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/05/2012, 05:25
echo_
 
Fecha de Ingreso: noviembre-2011
Ubicación: Paris
Mensajes: 450
Antigüedad: 12 años, 5 meses
Puntos: 7
Que estoy haciendo mal?

Buenas noches a todos, ya le he dado muchas vueltas al codigo pero no se en que ando mal, es lo siguiente: mando una variable a otra pagina para hacer un UPDATE, en la otra pagina si me aparece todo bien, no me sale error ni nada pero al momento de darle enviar no se actualizan ;c quisiera ver que es el error, POR FAVOR!

Código PHP:
 <td width="25"><a href="editar.php?edit='.$row[0].'"><img src="iconos/Edit_64.png" width="25" height="25" /></a></td


Código PHP:
      <?php

     
include "config.php";
     if (!isset(
$accion)){
     
         
//Aqui es donde tomamos el id que nos mandan de la pagina anterior para hacer una seleccion y modificar los
         //valores de ese id
        
$result=mysql_query("SELECT * FROM articulos WHERE id=$edit"$conexion);
        
$row=mysql_fetch_array($result);
        
        

        
                      
                      
                    echo
'<td height="30"><form action="editar.php?accion=guardar" method="POST">
                          <label for="isbn">Isbn</label>
                          <input name="isbn" type="text" id="isbn" value="<?php echo $row[1]; ?>"size="40" />
                        </td>
                      </tr>
                      <tr>
                        <td height="30">
                          <label for="nomb_art">Nombre del Articulo</label>
                          <input name="nomb_art" type="text" id="nomb_art" value="<?php echo $row[2]; ?>" size="30" />
                      </td>
                      </tr>
                      <tr>
                        <td height="30">
                          <label for="autor_art">Autor</label>
                          <input name="autor_art" type="text" id="autor_art" value="<?php echo $row[3]; ?>" size="40" />
                      </td>
                      </tr>
                      <tr>
                        <td height="30">
                          <label for="fecha_pub">Fecha de publicacion</label>
                          <input name="fecha_pub" type="text" id="fecha_pub" value="<?php echo $row[4]; ?>" size="40" />
                       </td>
                      </tr>
                      <tr>
                        <td height="30">
                          <label for="desc_art">Descripcion</label>
                          <input name="desc_art" type="text" id="desc_art" value="<?php echo $row[5]; ?>" size="40" />
                       </td>
                      </tr>
                      <tr>
                        <td height="30">
                          <label for="abstract">Trata</label>
                          <input name="abstractf" type="text" id="abstractf" value="<?php echo $row[6]; ?>" size="40" />
                       </td>
                      </tr>
                      <tr>
                        <td height="30">
                          <label for="entidad_pub">Entidad  publica</label>
                          <input name="entidad_pub" type="text" id="entidad_pub" value="<?php echo $row[7]; ?>" size="40" />
                      </td>
                      </tr>
                      <tr>
                        <td height="30">
                          <label for="precio_art">Precio</label>
                          <input name="precio_art" type="text" id="precio_art" value="<?php echo $row[8]; ?>" size="40" />
                       </td>
                      </tr>
                      <tr>
                        <td height="30">
                          <label for="clave_busq">Clave</label>
                          <input name="clave_busq" type="text" id="clave_busq" value="<?php echo $row[9]; ?>" size="40" />
                       </td>
                      </tr>
                      <tr>
                        <td height="30">
                          <label for="pais_pub">Publicado </label>
                          <input name="pais_pub" type="text" id="pais_pub" value="<?php echo $row[10]; ?>" size="40" />
                       </td>
                      </tr>
                      <tr>
                        <td height="30">
                          <label for="archivo">Archivo</label>
                          <input name="archivo" type="file" id="archivo" size="40" />
                       </td>
                      </tr>
                      <tr>
                        <td height="30">
                        
                           <input type="hidden" name="id" value="'
.$row[0].'">
                          <input type="submit" name="enviar" id="enviar" value="Enviar" />
            
                        </form></td>    
                      </tr>'
;
                    
                        }
                        
                        
                        
            
                        
                         elseif(
$accion=="guardar"){
     

     
$a=$_POST["isbn"];
     
$b=$_POST["nomb_art"];
     
$c=$_POST["autor_art"];
     
$d=$_POST["fecha_pub"];
     
$e=$_POST["desc_art"];
     
$f=$_POST["abstractf"];
     
$g=$_POST["entidad_pub"];
     
$h=$_POST["precio_art"];
     
$i=$_POST["clave_busq"];
     
$j=$_POST["pais_pub"];
     
       
$result=mysql_query("UPDATE articulos SET isbn='$a',nomb_art='$b',autor_art='$c',fecha_pub='$d',desc_art='$e',abstract='$f',entidad_pub='$g',precio_art='$h',clave_busq='$i',pais_pub='$j' WHERE id=$edit"$conexion);
      
        echo
' <html>
         <head>  
        <script language="JavaScript" type="text/javascript">
alert("El registro ha sido actualizado exitosamente!");
</script>
         
         </head>
         <body>
    
         </html>'
;
         
         
         
    }
                        
                        
?>