Re: move_uploaded_file lose variables



Is the directory the system is writing the file to set with the
correct permissions?

On Nov 23, 10:37 am, nicemot...@xxxxxxxxx wrote:
Hi all,

the following easy script correctly insert a record in the DB but is
not moving the images (Logo and Foto) to the server /foto folder.

can't understand why 'cause the script is easy and correct and i guess
it loses the $file_temp var (actually the printout of $file_temp0
return nothing)

i even tryed to write it repeating the parameters i/o using variables
but no results.

Anyone can help ?

Many thanks in advance

Nik

-----------------------------------

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1"))
{

//// set variables
$file_temp0=($_FILES['Logo']['tmp_name']);
$file_temp1=($_FILES['Foto']['tmp_name']);

//folder of the image on the server
$percorso="foto/";

$nuovo_nome0=$percorso.$_POST['Logo'];
$nuovo_nome1=$percorso.$_POST['Foto'];

$insertSQL = sprintf("INSERT INTO marcalinea (ID_MarcaLinea, Marca_,
LineaProdotto_, Logo, Foto, Descrizione, Pdf_) VALUES (%s, %s, %s, %s,
%s, %s, %s)",
GetSQLValueString($_POST['ID_MarcaLinea'],
"int"),
GetSQLValueString($_POST['Marca_'], "int"),
GetSQLValueString($_POST['LineaProdotto_'],
"int"),
GetSQLValueString($nuovo_nome0, "text"),
GetSQLValueString($nuovo_nome1, "text"),
GetSQLValueString($_POST['Descrizione'],
"text"),
GetSQLValueString($_POST['Pdf_'], "int"));

//print ($file_temp0); // return nothings
//print ($nuovo_nome0); // returns correctly /foto/img_name

mysql_select_db($database_Conn_Bianchi, $Conn_Bianchi);
$Result1 = mysql_query($insertSQL, $Conn_Bianchi) or
die(mysql_error());

////Everything ok 'till here; the following does't works:

######### upload image########

move_uploaded_file($file_temp0, $nuovo_nome0);
move_uploaded_file($_FILES["Foto"]["tmp_name"],"foto/" .
$_FILES["Foto"]["name"]);

###############################

$insertGoTo = "view.php";
etc...


.



Relevant Pages

  • Re: How to; Click on pic to bring up a larger photo and a caption
    ... to run the graphic compression feature on all the images. ... Create a folder on your host server called "biography". ... photo with a biography will appear about that person under the photo. ... some way to get back to the page with the other fallen comrades. ...
    (microsoft.public.publisher.webdesign)
  • Re: How to; Click on pic to bring up a larger photo and a caption
    ... I suspect you have, but if not, be sure to run the graphic compression feature on all the images. ... Create a folder on your host server called "biography". ... photo with a biography will appear about that person under the photo. ... some way to get back to the page with the other fallen comrades. ...
    (microsoft.public.publisher.webdesign)
  • Re: How to; Click on pic to bring up a larger photo and a caption
    ... the graphic compression feature on all the images. ... Create a folder on your host server called "biography". ... photo with a biography will appear about that person under the photo. ...
    (microsoft.public.publisher.webdesign)
  • Re: RIS failure
    ... > I'm trying to set up RIS at first time. ... > Check of server succeds. ... >> from seeing custom images ("Choice Options" of Remote Installation>> Services ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: asynchronously writing to a file, a cheap way?
    ... your typical asynchronous route for writing to a file, ... performance when the processing server is running. ... end of the pipe doesn't need to be running. ... I you already have a thread pool or IOCP that you can use t handle the ...
    (microsoft.public.win32.programmer.kernel)