Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/03/2008, 11:15
Avatar de ranceis
ranceis
 
Fecha de Ingreso: septiembre-2006
Mensajes: 42
Antigüedad: 17 años, 7 meses
Puntos: 0
problema con adjuntado de imagenes

Tengo un codigo de php que realiza un adjuntado de imagenes , pero no me funciona en opera ni en firefox, alguien sabe como podria solucionar eso?

mi codigo del form es este

<form name="form1" enctype="multipart/form-data" method="post" action="">
<input type="file" name="file1" id="file1">
<br>
<input type="submit" name="Adjuntar" value="Adjuntar" id="Adjuntar">

<br>
</form>

el codigo php es:

if (isset($_POST['Adjuntar'])){ //checar si se envio el formulario


@mkdir ($mypath,0777,TRUE);

$imagen=$_FILES["file1"]['name'];
$tipo= $HTTP_POST_FILES['file1']['type'];
$tamanio= $HTTP_POST_FILES['file1']['size'];


if ($tipo=="image/gif" || $tipo=="image/pjpeg") {
$formato=true;

}

if($tamanio < 349909206){
$peso=true;
}

if($formato==true && $peso==true){
@copy($_FILES['file1']['tmp_name'],$mypath.$imagen);

}
}

HELPPPP!!!!!!!!!!!!!!!!!!

Última edición por ranceis; 05/03/2008 a las 12:12