Foros del Web » Programando para Internet » PHP »

[SOLUCIONADO] formulario de admin para subir imagenes

Estas en el tema de formulario de admin para subir imagenes en el foro de PHP en Foros del Web. Hola, estoy siguiendo unos video tutoriales y no consigo que el boton de subir imagen haga la accion de ir a buscar imagenes en mi ...
  #1 (permalink)  
Antiguo 01/08/2013, 20:30
 
Fecha de Ingreso: agosto-2013
Mensajes: 13
Antigüedad: 10 años, 8 meses
Puntos: 0
formulario de admin para subir imagenes

Hola, estoy siguiendo unos video tutoriales y no consigo que el boton de subir imagen haga la accion de ir a buscar imagenes en mi pc, os dejo el codigo a ver si podeis ayudarme

La pagina de administracion de los sliders es esta

Código:
http://reparotuordenador.com/_admin/slider_add.php
slider_add.php


Código:
<?php require_once('../Connections/conexionreparo1.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO tblsider (strImagengrande, strImagenpequena, strTitulo, strSubtitulo, strMenu, strLink, intOrden, intEstado) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['strImagengrande'], "text"),
                       GetSQLValueString($_POST['strImagenpequena'], "text"),
                       GetSQLValueString($_POST['strTitulo'], "text"),
                       GetSQLValueString($_POST['strSubtitulo'], "text"),
                       GetSQLValueString($_POST['strMenu'], "text"),
                       GetSQLValueString($_POST['strLink'], "text"),
                       GetSQLValueString($_POST['intOrden'], "int"),
                       GetSQLValueString($_POST['intEstado'], "int"));

  mysql_select_db($database_conexionreparo1, $conexionreparo1);
  $Result1 = mysql_query($insertSQL, $conexionreparo1) or die(mysql_error());

  $insertGoTo = "slider_lista.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/plantilladmin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Administraci&oacute;n Reparo</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="../css/estiloadmin.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div class="container">
  <div class="header"><?php include("../includes/cabecera_admin.php"); ?></div>
  <div class="sidebar1"><?php include("../includes/menuizquierda_admin.php"); ?>

    <p>&nbsp;</p>
    <!-- end .sidebar1 --></div>
  <div class="content"><!-- InstanceBeginEditable name="Partederechaadmin" -->
  <script>
function subirimagen()
{
self.name = opener;
remote = open(popfile_imagenproducto.php, remote,
width=400,height=150,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no, status=yes);
remote.focus();
}
</script>
</script>

    <h1>A&ntilde;adir Publicidad</h1>
    <p>&nbsp;</p>
    <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
      <table align="center">
        <tr valign="baseline">
          <td width="217" align="right" nowrap="nowrap">Imagen Grande (734x250):</td>
          <td width="306"><input type="text" name="strImagengrande" value="" size="32" /><input type= "button" name="button" id="button" value="Subir Imagen" onclick="javascript:subirimagen();"/></td><td width="39"></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Imagen Pequena (80x50px):</td>
          <td><input type="text" name="strImagenpequena" value="" size="32" /><input type= "button" name="button2" id="button2" value="Subir Imagen" onclick="javascript:subirimagen();"/></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Titulo:</td>
          <td><input type="text" name="strTitulo" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Subtitulo:</td>
          <td><input type="text" name="strSubtitulo" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Menu:</td>
          <td><input type="text" name="strMenu" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Link:</td>
          <td><input type="text" name="strLink" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Orden:</td>
          <td><input type="text" name="intOrden" value="" size="5" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Estado:</td>
          <td><label for="intEstado"></label>
            <select name="intEstado" id="intEstado">
              <option value="1">Activo</option>
              <option value="0">Desactivado</option>
          </select></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">&nbsp;</td>
          <td align="left"><a class="button" 
          href="javascript:document.form1.submit();"><span>Insertar Slider</span></a> 
          </td>
        </tr>
      </table>
      <input type="hidden" name="MM_insert" value="form1" />
    </form>
    <p>&nbsp;</p>
  <!-- InstanceEndEditable -->
  
    <!-- end .content --></div>
  <div class="footer"><?php include("../includes/pie_admin.php"); ?>
    </div>
  <!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

luego he visto que habia que crear un nuevo archivo llamado gestionimagen.php en la carpeta admin y el codigo es este:

Código:
  <script>
function subirimagen()
{
self.name = opener;
remote = open(popfile_imagenproducto.php, remote,
width=400,height=150,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no, status=yes);
remote.focus();
}
</script>

Última edición por josebr1991; 01/08/2013 a las 20:37
  #2 (permalink)  
Antiguo 01/08/2013, 20:58
 
Fecha de Ingreso: agosto-2013
Mensajes: 13
Antigüedad: 10 años, 8 meses
Puntos: 0
Respuesta: formulario de admin para subir imagenes

Hola de nuevo , faltaban comillas por poner, pero sigue sin salir los archivos de mi pc se queda en blanco

slider_add.php

Código:
<?php require_once('../Connections/conexionreparo1.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO tblsider (strImagengrande, strImagenpequena, strTitulo, strSubtitulo, strMenu, strLink, intOrden, intEstado) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['strImagengrande'], "text"),
                       GetSQLValueString($_POST['strImagenpequena'], "text"),
                       GetSQLValueString($_POST['strTitulo'], "text"),
                       GetSQLValueString($_POST['strSubtitulo'], "text"),
                       GetSQLValueString($_POST['strMenu'], "text"),
                       GetSQLValueString($_POST['strLink'], "text"),
                       GetSQLValueString($_POST['intOrden'], "int"),
                       GetSQLValueString($_POST['intEstado'], "int"));

  mysql_select_db($database_conexionreparo1, $conexionreparo1);
  $Result1 = mysql_query($insertSQL, $conexionreparo1) or die(mysql_error());

  $insertGoTo = "slider_lista.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/plantilladmin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Administraci&oacute;n Reparo</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="../css/estiloadmin.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div class="container">
  <div class="header"><?php include("../includes/cabecera_admin.php"); ?></div>
  <div class="sidebar1"><?php include("../includes/menuizquierda_admin.php"); ?>

    <p>&nbsp;</p>
    <!-- end .sidebar1 --></div>
  <div class="content"><!-- InstanceBeginEditable name="Partederechaadmin" -->
  <script>
function subirimagen()
{
self.name = 'opener';
remote = open('gestionimagen.php', 'remote',
'width=400,height=150,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no, status=yes');
remote.focus();
}
</script>
</script>

    <h1>A&ntilde;adir Publicidad</h1>
    <p>&nbsp;</p>
    <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
      <table align="center">
        <tr valign="baseline">
          <td width="217" align="right" nowrap="nowrap">Imagen Grande (734x250):</td>
          <td width="306"><input type="text" name="strImagengrande" value="" size="32" /><input type= "button" name="button" id="button" value="Subir Imagen" onclick="javascript:subirimagen();"/></td><td width="39"></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Imagen Pequena (80x50px):</td>
          <td><input type="text" name="strImagenpequena" value="" size="32" /><input type= "button" name="button2" id="button2" value="Subir Imagen" onclick="javascript:subirimagen();"/></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Titulo:</td>
          <td><input type="text" name="strTitulo" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Subtitulo:</td>
          <td><input type="text" name="strSubtitulo" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Menu:</td>
          <td><input type="text" name="strMenu" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Link:</td>
          <td><input type="text" name="strLink" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Orden:</td>
          <td><input type="text" name="intOrden" value="" size="5" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Estado:</td>
          <td><label for="intEstado"></label>
            <select name="intEstado" id="intEstado">
              <option value="1">Activo</option>
              <option value="0">Desactivado</option>
          </select></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">&nbsp;</td>
          <td align="left"><a class="button" 
          href="javascript:document.form1.submit();"><span>Insertar Slider</span></a> 
          </td>
        </tr>
      </table>
      <input type="hidden" name="MM_insert" value="form1" />
    </form>
    <p>&nbsp;</p>
  <!-- InstanceEndEditable -->
  
    <!-- end .content --></div>
  <div class="footer"><?php include("../includes/pie_admin.php"); ?>
    </div>
  <!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>
gestionimagen.php

Código:
 <script>
function subirimagen()
{
self.name = 'opener';
remote = open('gestionimagen.php', 'remote',
'width=400,height=150,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no, status=yes');
remote.focus();
}
</script>
</script>
  #3 (permalink)  
Antiguo 01/08/2013, 22:36
 
Fecha de Ingreso: agosto-2013
Mensajes: 13
Antigüedad: 10 años, 8 meses
Puntos: 0
Respuesta: formulario de admin para subir imagenes

He conseguido solucionarlo, pero no me sale esto al intentar subir imagenes


Warning: Wrong parameter count for move_uploaded_file() in /homepages/33/d396330682/htdocs/_admin/gestionimagen.php on line 12


el codigo actualizado:

gestionimagen.php

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Subir Imagen</title>
<link href="/css/estiloadmin.css" rel="stylesheet" type="text/css" />
</head>

<body>

<?php if ((isset($_POST["enviado"])) && ($_POST["enviado"] == "form1")) {
	$nombre_archivo = $_FILES['userfile']['name']; 
	move_uploaded_file($_FILES['userfile']['tmp_name'], "/images/slider/".$nombre_archivo);
	
	?>
    <script>
		opener.document.form1.<?php echo $_POST["nombrecampo"]; ?>;.value="<?php echo $nombre_archivo; ?>";
		self.close();
	</script>
    <?php
}
else
{?>


<form action="gestionimagen.php" method="post" enctype="multipart/form-data" id="form1"  name="form1">

  <p>
    <input name="userfile" type="file" />
  </p>
  <p>
    <input type="submit" name="button" id="button" value="Subir Imagen" />
  <input name="nombrecampo" type="hidden" value="<?php echo $_GET["campo"]; ?>" />
  <input type="hidden" name="enviado" value="form1" />
</form>
<?php }?>
</body>
</html>
slider_add.php

Código:
<?php require_once('../Connections/conexionreparo1.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO tblsider (strImagengrande, strImagenpequena, strTitulo, strSubtitulo, strMenu, strLink, intOrden, intEstado) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['strImagengrande'], "text"),
                       GetSQLValueString($_POST['strImagenpequena'], "text"),
                       GetSQLValueString($_POST['strTitulo'], "text"),
                       GetSQLValueString($_POST['strSubtitulo'], "text"),
                       GetSQLValueString($_POST['strMenu'], "text"),
                       GetSQLValueString($_POST['strLink'], "text"),
                       GetSQLValueString($_POST['intOrden'], "int"),
                       GetSQLValueString($_POST['intEstado'], "int"));

  mysql_select_db($database_conexionreparo1, $conexionreparo1);
  $Result1 = mysql_query($insertSQL, $conexionreparo1) or die(mysql_error());

  $insertGoTo = "slider_lista.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/plantilladmin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Administraci&oacute;n Reparo</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="../css/estiloadmin.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div class="container">
  <div class="header"><?php include("../includes/cabecera_admin.php"); ?></div>
  <div class="sidebar1"><?php include("../includes/menuizquierda_admin.php"); ?>

    <p>&nbsp;</p>
    <!-- end .sidebar1 --></div>
  <div class="content"><!-- InstanceBeginEditable name="Partederechaadmin" -->
<script>
function subirimagen(nombrecampo)
{
self.name = 'opener';
remote = open('gestionimagen.php?campo='+nombrecampo, 'remote', 'with=400, height=150, location=no, scrollbars=yes, menubars=no, toolbars=no, resizable=yes, fullscreen=no, status=yes');
remote.focus();
}
</script>


    <h1>A&ntilde;adir Publicidad</h1>
    <p>&nbsp;</p>
    <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
      <table align="center">
        <tr valign="baseline">
          <td width="217" align="right" nowrap="nowrap">Imagen Grande (734x250):</td>
          <td width="306"><input type="text" name="strImagenGrande" value="" size="32" /><input type= "button" name="button" id="button" value="Subir Imagen" onclick="javascript:subirimagen('strImagenGrande');"/></td><td width="39"></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Imagen Pequena (80x50px):</td>
          <td><input type="text" name="strImagenPequena" value="" size="32" /><input type= "button" name="button2" id="button2" value="Subir Imagen" onclick="javascript:subirimagen('strImagenPequena');"/></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Titulo:</td>
          <td><input type="text" name="strTitulo" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Subtitulo:</td>
          <td><input type="text" name="strSubtitulo" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Menu:</td>
          <td><input type="text" name="strMenu" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Link:</td>
          <td><input type="text" name="strLink" value="" size="32" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Orden:</td>
          <td><input type="text" name="intOrden" value="" size="5" /></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">Estado:</td>
          <td><label for="intEstado"></label>
            <select name="intEstado" id="intEstado">
              <option value="1">Activo</option>
              <option value="0">Desactivado</option>
          </select></td>
        </tr>
        <tr valign="baseline">
          <td nowrap="nowrap" align="right">&nbsp;</td>
          <td align="left"><a class="button" 
          href="javascript:document.form1.submit();"><span>Insertar Slider</span></a> 
          </td>
        </tr>
      </table>
      <input type="hidden" name="MM_insert" value="form1" />
    </form>
    <p>&nbsp;</p>
  <!-- InstanceEndEditable -->
  
    <!-- end .content --></div>
  <div class="footer"><?php include("../includes/pie_admin.php"); ?>
    </div>
  <!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>

Última edición por josebr1991; 02/08/2013 a las 01:09
  #4 (permalink)  
Antiguo 02/08/2013, 12:40
Avatar de andinog  
Fecha de Ingreso: febrero-2012
Mensajes: 50
Antigüedad: 12 años, 2 meses
Puntos: 6
Respuesta: formulario de admin para subir imagenes

Mire varias veces tu codigo y la verdad no veo nada raro cerca de

move_uploaded_file()

lo unico que se me ocurre es que la variable

Código PHP:
Ver original
  1. $_FILES['userfile']['tmp_name']

llegue vacia.

Podes comprobar su contenido con la funcion

Código PHP:
Ver original
  1. var_dump ( $_FILES['userfile']['tmp_name'] );

Lo que hace es volcar el contenido como si fuera un echo, para saber que tiene adentro.

Saludos
__________________
"El que nada duda nada sabe"
Ser Programador
  #5 (permalink)  
Antiguo 02/08/2013, 13:17
 
Fecha de Ingreso: agosto-2013
Mensajes: 13
Antigüedad: 10 años, 8 meses
Puntos: 0
Respuesta: formulario de admin para subir imagenes

Hola, he copiado el codigo y al subir una imagen me sale: string(14) "/tmp/phpZOij1j"

PD: Ya lo solucioné quitando el ; de opener.document.form1.<?php echo $_POST["nombrecampo"]; ?>;.value="<?php echo $nombre_archivo; ?>";

Última edición por josebr1991; 03/08/2013 a las 10:14

Etiquetas: admin, formulario, html, imagenes, mysql, select, sql
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 09:05.