Foros del Web » Programando para Internet » PHP »

Error código PHP para subir archivo a servidor, y almacenar la ruta a Mysql

Estas en el tema de Error código PHP para subir archivo a servidor, y almacenar la ruta a Mysql en el foro de PHP en Foros del Web. Hola a todos: Me gustaría subir una imagen al servidor, y guardar la ruta de la misma en la BD Mysql, entro con este formulario ...
  #1 (permalink)  
Antiguo 30/08/2010, 13:31
 
Fecha de Ingreso: julio-2010
Ubicación: Cerca Sitges (Barcelona)
Mensajes: 98
Antigüedad: 13 años, 9 meses
Puntos: 4
Error código PHP para subir archivo a servidor, y almacenar la ruta a Mysql

Hola a todos:

Me gustaría subir una imagen al servidor, y guardar la ruta de la misma en la BD Mysql, entro con este formulario PHP, al parecer todo funciona ok, la ruta queda almacenada en la BD, pero el archivo que se supone que estaría en el servidor, no lo está. ?¿

Alguna sugerencia.

Muchas Gracias.

Código PHP:
Ver original
  1. <?php require_once('Connections/con_imag.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6.   if (PHP_VERSION < 6) {
  7.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  8.   }
  9.  
  10.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  11.  
  12.   switch ($theType) {
  13.     case "text":
  14.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  15.       break;    
  16.     case "long":
  17.     case "int":
  18.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  19.       break;
  20.     case "double":
  21.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  22.       break;
  23.     case "date":
  24.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  25.       break;
  26.     case "defined":
  27.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  28.       break;
  29.   }
  30.   return $theValue;
  31. }
  32. }
  33.  
  34. $editFormAction = $_SERVER['PHP_SELF'];
  35. if (isset($_SERVER['QUERY_STRING'])) {
  36.   $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
  37. }
  38.  
  39. if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  40.     $tipo_prod = $_POST["lstTipo"];
  41.  
  42. //Guardar imagen
  43.     if(is_uploaded_file($_FILES['fleImagen']['tmp_name'])) { // verifica haya sido cargado el archivo
  44.         $ruta= "images/$tipo_prod/".$_FILES['fleImagen']['name'];
  45. @       move_uploaded_file($_FILES['fleImagen']['tmp_name'], $ruta);
  46.     }
  47.    
  48.   $insertSQL = sprintf("INSERT INTO contactos (Referencia, telefono, Imagen, Tipo, Precio, Nombreimg, Descripcion) VALUES (%s, %s, %s, %s, %s, %s, %s)",
  49.                        GetSQLValueString($_POST['txtReferencia'], "int"),
  50.                        GetSQLValueString($_POST['txttelefono'], "text"),
  51.                        GetSQLValueString($ruta, "text"),
  52.                        GetSQLValueString($_POST['lstTipo'], "text"),
  53.                        GetSQLValueString($_POST['txtPrecio'], "double"),
  54.                        GetSQLValueString($_POST['txtNombreimg'], "text"),
  55.                        GetSQLValueString($_POST['txtDescripcion'], "text"));
  56.  
  57.   mysql_select_db($database_con_imag, $con_imag);
  58.   $Result1 = mysql_query($insertSQL, $con_imag) or die(mysql_error());
  59.  
  60.   $insertGoTo = "ingreso_exitoso.php";
  61.   if (isset($_SERVER['QUERY_STRING'])) {
  62.     $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
  63.     $insertGoTo .= $_SERVER['QUERY_STRING'];
  64.   }
  65. @  header(sprintf("Location: %s", $insertGoTo));
  66. }
  67. ?>
  68. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  69. <html xmlns="http://www.w3.org/1999/xhtml">
  70. <head>
  71. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  72. <title>Documento sin t&iacute;tulo</title>
  73. </head>
  74.  
  75. <body>
  76. <form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="form1" id="form1">
  77.   <table width="590" border="1">
  78.     <tr>
  79.       <td width="208">&nbsp;</td>
  80.       <td width="366">&nbsp;</td>
  81.     </tr>
  82.     <tr>
  83.       <td>&nbsp;</td>
  84.       <td>&nbsp;</td>
  85.     </tr>
  86.     <tr>
  87.       <td>&nbsp;</td>
  88.       <td>&nbsp;</td>
  89.     </tr>
  90.     <tr>
  91.       <td>&nbsp;</td>
  92.       <td>&nbsp;</td>
  93.     </tr>
  94.     <tr>
  95.       <td>&nbsp;</td>
  96.       <td>&nbsp;</td>
  97.     </tr>
  98.     <tr>
  99.       <td>&nbsp;</td>
  100.       <td>&nbsp;</td>
  101.     </tr>
  102.     <tr>
  103.       <td colspan="2" bgcolor="#71AAE5"><div align="center"> <strong><em>Datos de acceso a su/s anuncio/s.</em></strong></div></td>
  104.     </tr>
  105.     <tr>
  106.       <td><strong>Teléfono:</strong></td>
  107.       <td colspan="2"><label for="txttelefono"></label>
  108.         <input type="text" name="txttelefono" id="txttelefono" /></td>
  109.      
  110.     -    </tr>
  111.     <tr>
  112.       <td colspan="2">&nbsp;</td>
  113.     </tr>
  114.     <tr>
  115.       <td width="208"><strong>Referencia:</strong></td>
  116.       <td width="366"><label for="txtReferencia"></label>
  117.         <input name="txtReferencia" type="text" id="txtReferencia" value="ref. 2654112445" readonly="readonly" /></td>
  118.     </tr>
  119.     <tr>
  120.       <td><strong>Imagen:</strong></td>
  121.       <td><label for="fleImagen"></label>
  122.         <input type="file" name="fleImagen" id="fleImagen" /></td>
  123.     </tr>
  124.     <tr>
  125.       <td>&nbsp;</td>
  126.       <td>&nbsp;</td>
  127.     </tr>
  128.     <tr>
  129.       <td>&nbsp;</td>
  130.       <td>&nbsp;</td>
  131.     </tr>
  132.     <tr>
  133.       <td><strong>Nombre:</strong></td>
  134.       <td><label for="txtNombreimg"></label>
  135.         <input type="text" name="txtNombreimg" id="txtNombreimg" /></td>
  136.     </tr>
  137.     <tr>
  138.       <td>&nbsp;</td>
  139.       <td>&nbsp;</td>
  140.     </tr>
  141.     <tr>
  142.       <td><strong>Tipo:</strong></td>
  143.       <td><label for="lstTipo"></label>
  144.         <select name="lstTipo" id="lstTipo">
  145.           <option value="camisetas" selected="selected">Camisetas</option>
  146.           <option value="accesorios">Accesorios</option>
  147.         </select></td>
  148.     </tr>
  149.     <tr>
  150.       <td><strong>Precio:</strong></td>
  151.       <td><label for="txtPrecio"></label>
  152.         <input type="text" name="txtPrecio" id="txtPrecio" /></td>
  153.     </tr>
  154.     <tr>
  155.       <td><strong>Descripci&oacute;n:</strong></td>
  156.       <td><label for="txtDescripcion"></label>
  157.         <textarea name="txtDescripcion" id="txtDescripcion" cols="45" rows="5"></textarea></td>
  158.     </tr>
  159.     <tr>
  160.       <td>&nbsp;</td>
  161.       <td>&nbsp;</td>
  162.     </tr>
  163.   </table>
  164.   <p>
  165.     <input type="submit" name="button" id="button" value="Enviar" />
  166.   </p>
  167.   <input type="hidden" name="MM_insert" value="form1" />
  168. </form>
  169. </body>
  170. </html>
  #2 (permalink)  
Antiguo 30/08/2010, 13:36
 
Fecha de Ingreso: febrero-2010
Mensajes: 818
Antigüedad: 14 años, 2 meses
Puntos: 55
Respuesta: Error código PHP para subir archivo a servidor, y almacenar la ruta a Mysq

hace
Código PHP:
 if( move_uploaded_file($_FILES['fleImagen']['tmp_name'], $ruta)){

//aca el insert

y te aseguras de guardar la ruta solo si el archivo fue movido
  #3 (permalink)  
Antiguo 30/08/2010, 13:47
 
Fecha de Ingreso: julio-2010
Ubicación: Cerca Sitges (Barcelona)
Mensajes: 98
Antigüedad: 13 años, 9 meses
Puntos: 4
Respuesta: Error código PHP para subir archivo a servidor, y almacenar la ruta a Mysq

Gracias pero!

Parse error: syntax error, unexpected $end in /var/www/vhost/.../home/html/PracticaImagenes/formulario_ok.php on line 173
  #4 (permalink)  
Antiguo 30/08/2010, 13:48
Avatar de abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: Error código PHP para subir archivo a servidor, y almacenar la ruta a Mysq

Problema de parentesis, si es que copiaste y pegaste lo que te indicaron.
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos
  #5 (permalink)  
Antiguo 30/08/2010, 13:52
 
Fecha de Ingreso: julio-2010
Ubicación: Cerca Sitges (Barcelona)
Mensajes: 98
Antigüedad: 13 años, 9 meses
Puntos: 4
Respuesta: Error código PHP para subir archivo a servidor, y almacenar la ruta a Mysq

modificado.

Código PHP:
Ver original
  1. <?php require_once('Connections/con_imag.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6.   if (PHP_VERSION < 6) {
  7.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  8.   }
  9.  
  10.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  11.  
  12.   switch ($theType) {
  13.     case "text":
  14.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  15.       break;    
  16.     case "long":
  17.     case "int":
  18.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  19.       break;
  20.     case "double":
  21.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  22.       break;
  23.     case "date":
  24.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  25.       break;
  26.     case "defined":
  27.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  28.       break;
  29.   }
  30.   return $theValue;
  31. }
  32. }
  33.  
  34. $editFormAction = $_SERVER['PHP_SELF'];
  35. if (isset($_SERVER['QUERY_STRING'])) {
  36.   $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
  37. }
  38.  
  39. if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  40.     $tipo_prod = $_POST["lstTipo"];
  41.  
  42. //Guardar imagen
  43.     if(is_uploaded_file($_FILES['fleImagen']['tmp_name'])) { // verifica haya sido cargado el archivo
  44.         $ruta= "images/$tipo_prod/".$_FILES['fleImagen']['name'];
  45. if( move_uploaded_file($_FILES['fleImagen']['tmp_name'], $ruta)){
  46.  
  47. //aca el insert
  48. }
  49.    
  50.  
  51.  $insertSQL = sprintf("INSERT INTO contactos (Referencia, telefono, Imagen, Tipo, Precio, Nombreimg, Descripcion) VALUES (%s, %s, %s, %s, %s, %s, %s)",
  52.                        GetSQLValueString($_POST['txtReferencia'], "int"),
  53.                        GetSQLValueString($_POST['txttelefono'], "text"),
  54.                        GetSQLValueString($ruta, "text"),
  55.                        GetSQLValueString($_POST['lstTipo'], "text"),
  56.                        GetSQLValueString($_POST['txtPrecio'], "double"),
  57.                        GetSQLValueString($_POST['txtNombreimg'], "text"),
  58.                        GetSQLValueString($_POST['txtDescripcion'], "text"));
  59.  
  60.   mysql_select_db($database_con_imag, $con_imag);
  61.   $Result1 = mysql_query($insertSQL, $con_imag) or die(mysql_error());
  62.  
  63.   $insertGoTo = "ingreso_exitoso.php";
  64.   if (isset($_SERVER['QUERY_STRING'])) {
  65.     $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
  66.     $insertGoTo .= $_SERVER['QUERY_STRING'];
  67.   }
  68. @  header(sprintf("Location: %s", $insertGoTo));
  69. }
  70. ?>
  71. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  72. <html xmlns="http://www.w3.org/1999/xhtml">
  73. <head>
  74. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  75. <title>Documento sin t&iacute;tulo</title>
  76. </head>
  77.  
  78. <body>
  79. <form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="form1" id="form1">
  80.   <table width="590" border="1">
  81.     <tr>
  82.       <td width="208">&nbsp;</td>
  83.       <td width="366">&nbsp;</td>
  84.     </tr>
  85.     <tr>
  86.       <td>&nbsp;</td>
  87.       <td>&nbsp;</td>
  88.     </tr>
  89.     <tr>
  90.       <td>&nbsp;</td>
  91.       <td>&nbsp;</td>
  92.     </tr>
  93.     <tr>
  94.       <td>&nbsp;</td>
  95.       <td>&nbsp;</td>
  96.     </tr>
  97.     <tr>
  98.       <td>&nbsp;</td>
  99.       <td>&nbsp;</td>
  100.     </tr>
  101.     <tr>
  102.       <td>&nbsp;</td>
  103.       <td>&nbsp;</td>
  104.     </tr>
  105.     <tr>
  106.       <td colspan="2" bgcolor="#71AAE5"><div align="center"> <strong><em>Datos de acceso a su/s anuncio/s.</em></strong></div></td>
  107.     </tr>
  108.     <tr>
  109.       <td><strong>Teléfono:</strong></td>
  110.       <td colspan="2"><label for="txttelefono"></label>
  111.         <input type="text" name="txttelefono" id="txttelefono" /></td>
  112.      
  113.     -    </tr>
  114.     <tr>
  115.       <td colspan="2">&nbsp;</td>
  116.     </tr>
  117.     <tr>
  118.       <td width="208"><strong>Referencia:</strong></td>
  119.       <td width="366"><label for="txtReferencia"></label>
  120.         <input name="txtReferencia" type="text" id="txtReferencia" value="ref. 2654112445" readonly="readonly" /></td>
  121.     </tr>
  122.     <tr>
  123.       <td><strong>Imagen:</strong></td>
  124.       <td><label for="fleImagen"></label>
  125.         <input type="file" name="fleImagen" id="fleImagen" /></td>
  126.     </tr>
  127.     <tr>
  128.       <td>&nbsp;</td>
  129.       <td>&nbsp;</td>
  130.     </tr>
  131.     <tr>
  132.       <td>&nbsp;</td>
  133.       <td>&nbsp;</td>
  134.     </tr>
  135.     <tr>
  136.       <td><strong>Nombre:</strong></td>
  137.       <td><label for="txtNombreimg"></label>
  138.         <input type="text" name="txtNombreimg" id="txtNombreimg" /></td>
  139.     </tr>
  140.     <tr>
  141.       <td>&nbsp;</td>
  142.       <td>&nbsp;</td>
  143.     </tr>
  144.     <tr>
  145.       <td><strong>Tipo:</strong></td>
  146.       <td><label for="lstTipo"></label>
  147.         <select name="lstTipo" id="lstTipo">
  148.           <option value="camisetas" selected="selected">Camisetas</option>
  149.           <option value="accesorios">Accesorios</option>
  150.         </select></td>
  151.     </tr>
  152.     <tr>
  153.       <td><strong>Precio:</strong></td>
  154.       <td><label for="txtPrecio"></label>
  155.         <input type="text" name="txtPrecio" id="txtPrecio" /></td>
  156.     </tr>
  157.     <tr>
  158.       <td><strong>Descripci&oacute;n:</strong></td>
  159.       <td><label for="txtDescripcion"></label>
  160.         <textarea name="txtDescripcion" id="txtDescripcion" cols="45" rows="5"></textarea></td>
  161.     </tr>
  162.     <tr>
  163.       <td>&nbsp;</td>
  164.       <td>&nbsp;</td>
  165.     </tr>
  166.   </table>
  167.   <p>
  168.     <input type="submit" name="button" id="button" value="Enviar" />
  169.   </p>
  170.   <input type="hidden" name="MM_insert" value="form1" />
  171. </form>
  172. </body>
  173. </html>
  #6 (permalink)  
Antiguo 30/08/2010, 14:01
 
Fecha de Ingreso: julio-2010
Ubicación: Cerca Sitges (Barcelona)
Mensajes: 98
Antigüedad: 13 años, 9 meses
Puntos: 4
Respuesta: Error código PHP para subir archivo a servidor, y almacenar la ruta a Mysq

o esta segunda opción??,

perdón por mi pesadez, pero soy bastante novato.


Código PHP:
Ver original
  1. <?php require_once('Connections/con_imag.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6.   if (PHP_VERSION < 6) {
  7.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  8.   }
  9.  
  10.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  11.  
  12.   switch ($theType) {
  13.     case "text":
  14.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  15.       break;    
  16.     case "long":
  17.     case "int":
  18.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  19.       break;
  20.     case "double":
  21.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  22.       break;
  23.     case "date":
  24.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  25.       break;
  26.     case "defined":
  27.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  28.       break;
  29.   }
  30.   return $theValue;
  31. }
  32. }
  33.  
  34. $editFormAction = $_SERVER['PHP_SELF'];
  35. if (isset($_SERVER['QUERY_STRING'])) {
  36.   $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
  37. }
  38.  
  39. if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  40.     $tipo_prod = $_POST["lstTipo"];
  41.  
  42. //Guardar imagen
  43.     if(is_uploaded_file($_FILES['fleImagen']['tmp_name'])) { // verifica haya sido cargado el archivo
  44.         $ruta= "images/$tipo_prod/".$_FILES['fleImagen']['name'];
  45. if( move_uploaded_file($_FILES['fleImagen']['tmp_name'], $ruta)){
  46.  
  47.  $insertSQL = sprintf("INSERT INTO contactos (Referencia, telefono, Imagen, Tipo, Precio, Nombreimg, Descripcion) VALUES (%s, %s, %s, %s, %s, %s, %s)",
  48.                        GetSQLValueString($_POST['txtReferencia'], "int"),
  49.                        GetSQLValueString($_POST['txttelefono'], "text"),
  50.                        GetSQLValueString($ruta, "text"),
  51.                        GetSQLValueString($_POST['lstTipo'], "text"),
  52.                        GetSQLValueString($_POST['txtPrecio'], "double"),
  53.                        GetSQLValueString($_POST['txtNombreimg'], "text"),
  54.                        GetSQLValueString($_POST['txtDescripcion'], "text"));
  55.  
  56.  
  57.  
  58.    }
  59.    
  60.    mysql_select_db($database_con_imag, $con_imag);
  61.   $Result1 = mysql_query($insertSQL, $con_imag) or die(mysql_error());
  62.  
  63.   $insertGoTo = "ingreso_exitoso.php";
  64.   if (isset($_SERVER['QUERY_STRING'])) {
  65.     $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
  66.     $insertGoTo .= $_SERVER['QUERY_STRING'];
  67.   }
  68. @  header(sprintf("Location: %s", $insertGoTo));
  69. }
  70. ?>
  71. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  72. <html xmlns="http://www.w3.org/1999/xhtml">
  73. <head>
  74. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  75. <title>Documento sin t&iacute;tulo</title>
  76. </head>
  77.  
  78. <body>
  79. <form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="form1" id="form1">
  80.   <table width="590" border="1">
  81.     <tr>
  82.       <td width="208">&nbsp;</td>
  83.       <td width="366">&nbsp;</td>
  84.     </tr>
  85.     <tr>
  86.       <td>&nbsp;</td>
  87.       <td>&nbsp;</td>
  88.     </tr>
  89.     <tr>
  90.       <td>&nbsp;</td>
  91.       <td>&nbsp;</td>
  92.     </tr>
  93.     <tr>
  94.       <td>&nbsp;</td>
  95.       <td>&nbsp;</td>
  96.     </tr>
  97.     <tr>
  98.       <td>&nbsp;</td>
  99.       <td>&nbsp;</td>
  100.     </tr>
  101.     <tr>
  102.       <td>&nbsp;</td>
  103.       <td>&nbsp;</td>
  104.     </tr>
  105.     <tr>
  106.       <td colspan="2" bgcolor="#71AAE5"><div align="center"> <strong><em>Datos de acceso a su/s anuncio/s.</em></strong></div></td>
  107.     </tr>
  108.     <tr>
  109.       <td><strong>Teléfono:</strong></td>
  110.       <td colspan="2"><label for="txttelefono"></label>
  111.         <input type="text" name="txttelefono" id="txttelefono" /></td>
  112.      
  113.     -    </tr>
  114.     <tr>
  115.       <td colspan="2">&nbsp;</td>
  116.     </tr>
  117.     <tr>
  118.       <td width="208"><strong>Referencia:</strong></td>
  119.       <td width="366"><label for="txtReferencia"></label>
  120.         <input name="txtReferencia" type="text" id="txtReferencia" value="ref. 2654112445" readonly="readonly" /></td>
  121.     </tr>
  122.     <tr>
  123.       <td><strong>Imagen:</strong></td>
  124.       <td><label for="fleImagen"></label>
  125.         <input type="file" name="fleImagen" id="fleImagen" /></td>
  126.     </tr>
  127.     <tr>
  128.       <td>&nbsp;</td>
  129.       <td>&nbsp;</td>
  130.     </tr>
  131.     <tr>
  132.       <td>&nbsp;</td>
  133.       <td>&nbsp;</td>
  134.     </tr>
  135.     <tr>
  136.       <td><strong>Nombre:</strong></td>
  137.       <td><label for="txtNombreimg"></label>
  138.         <input type="text" name="txtNombreimg" id="txtNombreimg" /></td>
  139.     </tr>
  140.     <tr>
  141.       <td>&nbsp;</td>
  142.       <td>&nbsp;</td>
  143.     </tr>
  144.     <tr>
  145.       <td><strong>Tipo:</strong></td>
  146.       <td><label for="lstTipo"></label>
  147.         <select name="lstTipo" id="lstTipo">
  148.           <option value="camisetas" selected="selected">Camisetas</option>
  149.           <option value="accesorios">Accesorios</option>
  150.         </select></td>
  151.     </tr>
  152.     <tr>
  153.       <td><strong>Precio:</strong></td>
  154.       <td><label for="txtPrecio"></label>
  155.         <input type="text" name="txtPrecio" id="txtPrecio" /></td>
  156.     </tr>
  157.     <tr>
  158.       <td><strong>Descripci&oacute;n:</strong></td>
  159.       <td><label for="txtDescripcion"></label>
  160.         <textarea name="txtDescripcion" id="txtDescripcion" cols="45" rows="5"></textarea></td>
  161.     </tr>
  162.     <tr>
  163.       <td>&nbsp;</td>
  164.       <td>&nbsp;</td>
  165.     </tr>
  166.   </table>
  167.   <p>
  168.     <input type="submit" name="button" id="button" value="Enviar" />
  169.   </p>
  170.   <input type="hidden" name="MM_insert" value="form1" />
  171. </form>
  172. </body>
  173. </html>

Etiquetas: almacenar, mysql, ruta, subir, servidores
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:26.