este es mi codigo entero cuando lo pongo entre <? y ?>
me sale este error
parse error syntax error,unexpected '}' in perfil.php on line 374
Código PHP:
Ver original<?
$add="imagenes/upimg/".$_FILES['fichero']['name']; // the path with the file name where the file will be stored, upload is the directory name.
//echo $add;
echo "Successfully uploaded the mage";
}else{
echo "Failed to upload file Contact Site admin to fix the problem";
}
///////// Start the thumbnail generation//////////////
$n_width=200; // Fix the width of the thumb nail images
$n_height=200; // Fix the height of the thumb nail imaage
////////////////////////////////////////////
$tsrc="imagenes/thimg/".$_FILES['fichero']['name']; // Path where thumb nail image will be stored
//echo $tsrc;
if (!($_FILES['fichero']['type'] =="image/jpeg" OR $_FILES['fichero']['type']=="image/gif")){echo "Your uploaded file must be of JPG or GIF. Other file types are not allowed<BR>";
/////////////////////////////////////////////// Starting of GIF thumb nail creation///////////
if (@$_FILES['fichero']['type']=="image/gif")
{
$width=ImageSx($im); // Original picture width is stored $height=ImageSy($im); // Original picture height is stored $n_height=($n_width/$width) * $height; // Add this line to maintain aspect ratio
Header("Content-type: image/gif"); }
Header("Content-type: image/jpeg"); }
}////////// end of gif file thumb nail creation//////////
////////////// starting of JPG thumb nail creation//////////
if($_FILES['fichero']['type']=="image/jpeg"){
$width=ImageSx($im); // Original picture width is stored $height=ImageSy($im); // Original picture height is stored $n_height=($n_width/$width) * $height; // Add this line to maintain aspect ratio
}
//////////////// End of JPG thumb nail creation //////////
echo "<br>width = ($width) $n_width , height = ($height) $n_height ";
?>
<?
//insertamos en la BD los campos del form
if(isset($_SESSION['usuario_id'])) // Aqui actualizaremos el perfil del usuario en la base de datos y le mostraremos que esta conectado {
$orden = ("select * from usuarios where usuario_id = ". $_SESSION['usuario_id'] ."");
$reg = mysql_query("INSERT INTO datos (usuario_id, fichero, descripcion, usuario_freg) VALUES ('".$usuario_id."', '".$_FILES['fichero']['name']."', '".$descripcion."', NOW())");
}
}else{echo "no se guardo la foto, ni se inserto en la Base de Datos";}
}else{echo "no se subio foto";}
}else{echo "";}