File upload issues


Posted on 16th Feb 2014 07:03 pm by admin

Hi Guys,

Can anyone see any issues with this code:
Code: [Select]$setImage= 'productimages/' . date(U) . $HTTP_POST_FILES['setImage']['name'][0];
copy($HTTP_POST_FILES['setImage']['tmp_name'][0], $setImage);
Its stripping the original file name (including the extension) fromt he end of the image and just giving it a unix timestamp for a name. Looking at the code I think I can see why its doing that but I can't see how to fix it.

Any help would be most appreciated

No comments posted yet

Your Answer:

Login to answer
153 Like 31 Dislike
Previous forums Next forums
Other forums

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

Confusing Functions
So, I've been reading up on Functions and I like them! However, I need some help using variables in

How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.

I am working on a application wh

Comparing Values
Hi
I'm reading data from a database and this seems to work OK.

Each system has an associat

Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listing

Session variable help
I'm having a very troubling issue. Maybe I'm just looking over something but I have looked at the co

Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",

ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:

License Issue - service type user
Hi,

I would like to understand the following issue regarding sap license.
I wish to

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash