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

152 Like 32 Dislike
Previous php-forum Next php-forum
Other php-forum

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

Multidimensional $_POST
Hello

How to get a single array from array of array (2 - dimension).
For example I have a

Stats of viewers
Hello. I have a website in php and people can login. I want to make an admin control panel where u c

Filling gaps in dates
So i'm doing a query for sales data and my return array looks like this

('date' => '20

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

path to include folder
Hi everyone,

When I'm testing locally, I have to add the name of the site folder as part of t

Need help with PHP/MySQL drop down menu
I need help on how I can implement a drop down menu which queries mysql database and output the avai

Thread in PHP
Thread in PHP
Some basic use and basic code for thread in php
This is my question?

Coding question?
Hey guys, I have a quick question. If I want to make a way for people to pay for health in my game,

Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, t

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