File upload issues


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

Hi Guys,

Can anyone see any issues with this code:
Code: $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
152 Like 32 Dislike
Previous forums Next forums
Other forums

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

Do something every fifth time?
I'm trying to write a loop, but I want it to do something different after every fifth instance. Like

Parse error: parse error in C:wampwwwlogspagesmembers.php on line 16
I dont see the problem with this, I always get Parse error: parse error in C:wampwwwlogspagesme

PHP and SMS
Hi all forum members. I am new here and am unsure what category shoild I post this in.
Moderator

Please help - should be a simple fix.. driving me nuts
Everything seemed to be working fine. I have a table, it alphabetically lists a bunch of cities and

Supress some serveroutput but not all
Hi,

I have a script I'm working on that uses plsql to create and RMAN script, this uses d

ob_ dynamic content
i was wondering about the potential to use ob to create a <div then remove it when the page

Not connecting to DB using ruby, error:env.c:257:in oci8lib.so: ORA-12154:
Hi All,

I am trying to connect to the database server from the client server using ruby and f

newbie question about multiple queries
hi everyone,
I'm sorry to ask such a basic question, but I'm young and trying to learn php on my

Adding delete feature to my forum
Hello I am currently trying to add a delete feature to my forum. I believe I have everything built r

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