Hi All,
I found this code to copy files to a directory on my server, but I cant figure out one part.
$ID = mysql_insert_id();
printf("Last inserted record has id %d\n", mysql_insert_id()); //test it
// Now you can use that ID to change the file names of the two files that were
// attached when the file was uploaded
$filename1 = "/home/website/public_html/staff/uploads/" . $ID . "-" . $FILE1_name ;
$filename2 = "/home/website/public_html/staff/uploads/" . $ID . "-" . $FILE2_name ;
@copy("$FILE1" , $filename1);
@copy("$FILE2" , $filename2);
This is the part I cant figure what it is or why its there?
$FILE1_name
Where is this coming from? How does, $FILE1_name become--> flower.jpg?
I must be missing something simple here.
If a variable is undefined, like this is I should end up with something like...
/home/website/public_html/staff/uploads/143- <--- then nothing for the filename.
Sorry, but it is annoying when something works, and I must just rely on it and not understand it.
Thanks a bunch.
Don