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

PHP Login
Hey!
I got this shopcart code online, am trying to modify it but am getting an error when i try a

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th

How to Handle more than one submit button in single form?
Hi
I have one PHP file which contains one Form. In this form there are two Submit type Buttons

Not loading image
When this function gets loaded it doesn't load the image just trying to figure out why.

Code:

User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the mo

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

PHP & MS Access - Line Break
Hey Guys!

I'm pulling records from an MS Access database and listing them using PHP and I'm r

Weird MySQL error, why am I recieving this?
PHP Code:


<?php require "global_settings.php"; ?>
<titl

DateTimeZone::listIdentifiers headache
http://php.net/manual/en/datetimezone.listidentifiers.php


So the documentation states tha

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