Hola Amigos tengo el siguiente codigo:
Estou usando la version 5.5.9
Código HTML:
<html>
<head>
<title>Uploade Archivo</title>
</head>
<body onload="document.form.reset();">
<form action="procesa.php" method="post" enctype="multipart/form-data">
<h3>Ingrese sus Datos</h3>
<h6>Los Campos con (*) son obligatorios</h6>
Nombre(*): <input type="text" name="nom" required/>
<br/>
Foto(*):<input type="file" name="img_up"/>
<br/>
<input type="submit" name="" value="Subir" title="Subir Archivo"/>
</form>
</body>
</html>
Y mo php es:
Código:
<?php
require_once("../conexion/conexion.php");
$foto=$_FILES["img_up"]["name"];
$temp=$_FILES["img_up"]["tmp_name"];
$tamano=$_FILES["img_up"]["size"];
echo "La foto en el pc: <strong>$foto</strong>";
echo "<br/>";
echo "En el server: <strong>$temp</strong>";
?>
Tengo el siguiente error:
Notice: Undefined index: img_up in C:\xampp\htdocs\curso_php\up_imagen\Procesa.php on line 3
Notice: Undefined index: img_up in C:\xampp\htdocs\curso_php\up_imagen\Procesa.php on line 4
La foto en el pc:
En el server: