Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/02/2014, 21:19
Avatar de marmol
marmol
 
Fecha de Ingreso: marzo-2004
Ubicación: en argentina
Mensajes: 197
Antigüedad: 20 años, 1 mes
Puntos: 4
Respuesta: formulario obtenido con fetch array en php problema con boton

ssi perdon lo estaba por editar
Código PHP:
Ver original
  1. echo "<form method=\"post\" action=\"admin_func.php\">";
  2. $numComments = 1;
  3.  
  4.  
  5.          $sql = 'SELECT * FROM `' . $table . '`';
  6.          $allComments = mysql_query($sql, $DBConn) or die("Error: operacion no valida: " . mysql_error());
  7.          $numallComments = mysql_num_rows($allComments);
  8.          // Fetch page-wise comments from database table
  9.          $sql .= ' ORDER BY `fecha` DESC LIMIT ' . $_GET['contador'] . ', ' . $numComments;
  10.          $fewComments = mysql_query($sql, $DBConn) or die("Error in GuestBook Application: " . mysql_error());
  11.          $numfewComments = mysql_num_rows($fewComments);
  12.          // Generate Output for Flash to Read  
  13.          
  14.          if($numallComments == 0) {
  15.             echo "No entries in the guestbook, as yet..";
  16.          } else {
  17.             while ($array = mysql_fetch_array($fewComments)) {             
  18.                $id = mysql_result($fewComments, $i, 'id');             
  19.                $producto = mysql_result($fewComments, $i, 'producto');
  20.                $detalles = mysql_result($fewComments, $i, 'detalles');
  21.                $garantia = mysql_result($fewComments, $i, 'garantia');
  22.                $boton_comprar = mysql_result($fewComments, $i, 'boton_comprar');
  23.                $precio = mysql_result($fewComments, $i, 'precio');
  24.                $compra_online = mysql_result($fewComments, $i, 'compra_online');
  25.                $disponible = mysql_result($fewComments, $i, 'disponible');
  26.                $fecha = mysql_result($fewComments, $i, 'fecha');
  27.                $link = mysql_result($fewComments, $i, 'link');
  28.                $imagen1 = mysql_result($fewComments, $i, 'imagen1');
  29.                $imagen2 = mysql_result($fewComments, $i, 'imagen2');
  30.                $imagen3 = mysql_result($fewComments, $i, 'imagen3');
  31.                $imagen_chiquita1 = mysql_result($fewComments, $i, 'imagen_chiquita1');
  32.                $imagen_chiquita2 = mysql_result($fewComments, $i, 'imagen_chiquita2');
  33.                $video_youtube1 = mysql_result($fewComments, $i, 'video_youtube1');
  34.                $video_youtube2 = mysql_result($fewComments, $i, 'video_youtube2');                 
  35.   echo "<div align=center>Id</div>";       
  36.   echo sprintf('<textarea name="id" cols="80" rows="7" class="formu" >%s</textarea> ', $id);                       
  37.   echo "<div align=center>Producto</div>";     
  38.   echo sprintf('<textarea name="producto" cols="80" rows="7" class="formu" >%s</textarea> ', $producto);
  39.   echo "<div align=center>Detalles</div>";  
  40.   echo sprintf('<textarea name="detalles" cols="80" rows="7" class="formu" >%s</textarea> ', $detalles);
  41.   echo "<div align=center>Garantia</div>";    
  42.   echo sprintf('<textarea name="garantia" cols="80" rows="7" class="formu" >%s</textarea> ', $garantia);
  43.   echo "<div align=center>Boton Comprar</div>";    
  44.   echo sprintf('<textarea name="boton_comprar" cols="80" rows="7" class="formu" >%s</textarea> ', $boton_comprar);
  45.   echo "<div align=center>Precio</div>";    
  46.   echo sprintf('<textarea name="precio" cols="80" rows="7" class="formu" >%s</textarea> ', $precio);
  47.   echo "<div align=center>Compra Online</div>";    
  48.   echo sprintf('<textarea name="compra_online" cols="80" rows="7" class="formu" >%s</textarea> ', $compra_online);
  49.   echo "<div align=center>Disponible</div>";  
  50.   echo sprintf('<textarea name="disponible" cols="80" rows="7" class="formu" >%s</textarea> ', $disponible);
  51.   echo "<div align=center>Fecha</div>";    
  52.   echo sprintf('<textarea name="fecha" cols="80" rows="7" class="formu" >%s</textarea> ', $fecha);
  53.   echo "<div align=center>Link</div>";    
  54.   echo sprintf('<textarea name="link" cols="80" rows="7" class="formu" >%s</textarea> ', $link);
  55.   echo "<div align=center>Imagen1</div>";    
  56.   echo sprintf('<textarea name="imagen1" cols="80" rows="7" class="formu" >%s</textarea> ', $imagen1);
  57.   echo "<div align=center>Imagen2</div>";      
  58.   echo sprintf('<textarea name="imagen2" cols="80" rows="7" class="formu" >%s</textarea> ', $imagen2);
  59.   echo "<div align=center>Imagen3</div>";    
  60.   echo sprintf('<textarea name="imagen3" cols="80" rows="7" class="formu" >%s</textarea> ', $imagen3);
  61.   echo "<div align=center>imagen_chiquita1</div>";    
  62.   echo sprintf('<textarea name="imagen_chiquita1" cols="80" rows="7" class="formu" >%s</textarea> ', $imagen_chiquita1);
  63.   echo "<div align=center>Imagen_Chiquita2</div>";    
  64.   echo sprintf('<textarea name="imagen_chiquita2" cols="80" rows="7" class="formu" >%s</textarea> ', $imagen_chiquita2);
  65.   echo "<div align=center>Video_youtube1</div>";    
  66.   echo sprintf('<textarea name="video_youtube1" cols="80" rows="7" class="formu" >%s</textarea> ', $video_youtube1);
  67.   echo "<div align=center>Video_youtube2</div>";    
  68.   echo sprintf('<textarea name="video_youtube2" cols="80" rows="7" class="formu" >%s</textarea> ', $video_youtube2);
  69. echo "<input type=\"submit\" name=\"enviar\" value=\"Procesar\">";
  70. echo "</form>";
  71.                $i++;
  72.         }
  73.         }
  74.         // Print this only when there aren't any more entries..
  75.         if($contador > $numallComments) {
  76.            echo 'No mas datos..';
  77.         }  
  78. echo sprintf('&nbsp;&nbsp;<div align=center><b>Pagina: %s</b></div>', $_GET['contador']);
  79. echo sprintf('&nbsp;<div align=center><b>Cantidad de productos existentes: %s</b></div>&nbsp;', $numallComments);
__________________
Fabricante Maquina industriales
http://www.guidobatanmaquinarias.com