Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/02/2014, 01:06
marianomartelli
 
Fecha de Ingreso: agosto-2012
Ubicación: Barcelona
Mensajes: 243
Antigüedad: 11 años, 9 meses
Puntos: 1
Como hacer para preguntar en un form

Hola,

Tengo un programa, el cual pregunto por un articulo me llama al siguiente programa que se llama consultarticulo.php y me muestra los datos. hasta aquí todo bien, lo que necesito es que en este programa hacer una pregunta: desea modificar alguno de los campos mostrados? y si es si que vaya a la posición donde se muestra y acepte el dato.
Código PHP:
Ver original
  1. <?php
  2.  
  3. include("conexion.php");
  4.  
  5. $nota = $_POST['nota'];
  6.  
  7. $consulta=("SELECT * FROM articulo WHERE  nota = '$nota'");
  8. $datos=mysql_query($consulta,$conexion);
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. ?>
  16.  
  17.  
  18.  
  19. <html xmlns="http://www.w3.org/1999/xhtml">
  20.     <head>
  21.         <meta name="keywords" content="" />
  22.         <meta name="description" content="" />
  23.         <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
  24.        
  25.         <title>Lista Articulos</title>
  26.         <link href="css/paginacion.css" type="text/css" rel="stylesheet">
  27.         <link href="css/style.css" rel="stylesheet" type="text/css" />
  28.         <link href="css/menu.css" rel="stylesheet" type="text/css" />
  29.     </head>
  30.     <body>
  31.         <div id="bg">
  32.             <div id="outer">
  33.                 <div id="header">
  34.                     <div id="logo">
  35.                         <h1>
  36.                             <a href="index.html">volver</a>
  37.                         </h1>
  38.                     </div><br><br>
  39.                    
  40.                    
  41.                 <h2  style="font-weight:bold; color:#FF8E18; text-align:center; font-size: 36px;">Mantención  de Articulos</h2>
  42.              
  43.            
  44.            
  45.                  <form method='POST' action='actualizar.php' enctype='multipart/form-data'>
  46. <?php            while($row = mysql_fetch_assoc($datos))
  47.        
  48.        
  49.  {
  50.  ?>
  51.        
  52.          <table>
  53.             <tr>         
  54.                <td>
  55.                     * Codigo:
  56.                </td>
  57.                <td>
  58.                 <span style = "color:white; font-weight: bold;"><?php  echo $row['codigo'];?></span>
  59.                
  60.                </td>       
  61.             </tr>
  62.            
  63.             <tr>         
  64.               <td>
  65.                    *  Descripcion:
  66.                </td>
  67.                <td>  
  68.                     <span style = "color:white; font-weight: bold;"><?php  echo $row['descripcion'];?></span>
  69.                    
  70.                  
  71.                </td>    
  72.             </tr>
  73.            
  74.             <tr>         
  75.                <td>
  76.                    * Medidas ancho:
  77.                </td>
  78.                <td>
  79.                      <span style = "color:white; font-weight: bold;"><?php  echo $row['medancho'];?></span>
  80.                    
  81.                </td>   
  82.             </tr>
  83.            
  84.             <tr>         
  85.                <td>
  86.                    * Madidas alto:
  87.                </td>
  88.                <td>
  89.                          <span style = "color:white; font-weight: bold;"><?php  echo $row['medalto'];?></span>
  90.                        
  91.                </td>   
  92.             </tr>
  93.            
  94.            
  95.             <tr>         
  96.                <td>
  97.                    * Tela:
  98.                </td>
  99.                <td>
  100.                          <span style = "color:white; font-weight: bold;"><?php  echo $row['tela'];?></span>
  101.                        
  102.                </td>   
  103.             </tr>
  104.            
  105.            
  106.            
  107.            
  108.             <tr>         
  109.                <td>
  110.                    * Costo Proveedor:
  111.                </td>
  112.                <td>
  113.                          <span style = "color:white; font-weight: bold;"><?php  echo $row['costo'];?></span>
  114.                        
  115.                </td>   
  116.             </tr>
  117.            
  118.             <tr>         
  119.                <td>
  120.                    * P.V.P:
  121.                </td>
  122.               <td>
  123.                        <span style = "color:white; font-weight: bold;"><?php  echo $row['pvp'];?></span>
  124.                      
  125.                </td>
  126.                
  127.              </tr>
  128.            
  129.            
  130.              <tr>
  131.                <td>
  132.                    * Descuento:
  133.                </td>
  134.                <td>
  135.                          <span style = "color:white; font-weight: bold;"><?php  echo $row['descuento'];?></span>
  136.                        
  137.                </td>       
  138.             </tr>
  139.        
  140.            
  141.             <tr>         
  142.                <td>
  143.                    * Nota
  144.                </td>
  145.                <td>
  146.                          <span style = "color:white; font-weight: bold;"><?php  echo $row['nota'];?></span>
  147.                        
  148.                    
  149.                </td>       
  150.             </tr>
  151.           <tr>
  152.           <tr>       
  153.                <td>
  154.                    * Fotografia:
  155.                </td>
  156.                <td>
  157.                
  158.            
  159.                 <img src="<?php echo $row['fotografia'];?>" width="197" height="173" >
  160.            
  161.                </td>       
  162.             </tr>
  163.           <tr>
  164.          
  165.           <tr>
  166.              <td><br><br>
  167.                <input type="submit" name="submit" class="button" value="Modifica" />
  168.                <input type="reset"  class="button"/>
  169.                <a href="articulos.php" class="button">Volver</a>
  170.              </td>
  171.           </tr>
  172.          
  173.        </table>  
  174.        </form>
  175.  <?php
  176. }
  177. ?>   
  178.        
  179.     </form>
  180.  
  181.    
  182.                
  183.                
  184.     </body>
  185. </html>

No se donde poner la consulta y como hacer para que vaya a la posición que se indica.

Gracias y saludos