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];
Did you know?Explore Trending and Topic pages for more stories like this.
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

Mysql error message
help me find out what this error message means:

"Duplicate entry '0' for key 'PRIMARY'&q

How to show next and prev records
Hi all,

Sorry if this is simple, i'm very new to php, well, any programming language actually

pull content
I have an existing page, domain/adverts.php which has a good PR. I've just rebuilt my site and the n

Php Mysql Page Loading Notice
Hi all,

I was wondering if there is a way (Sure there is) of showing a message or an image wh

help connecting a form to php and then emailing the form
Ok. So, I made a form, and I need help to where when submitted, I get an email with the submitted de

Breaking results into week blocks
I have a set of dates (and times), which are returned from a mySQL query.

These usually span

sapgui f4 help last search
I know this has to be simople. One user (maybe more) does not have the "last search saved" from the

Running External Scripts
I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaW

Securing a user input - need some confirmation
Hello All,

I am in the process of recoding a large proportion of an e-commerce site, one of t

php and downloading
I want to use a php script to create two files. Then I want it to redirect (or whatever) to have tho

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