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

Why do I get this error
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a5488351/public_html/b

xml element exists
Code: [Select]<?xml version="1.0"?>
<Addresses>
<

SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built

Need help Updating SQL Server Express DB from c# :(
Please can anyone help with:-
1 How to sructure the strSelect statement.
2 How to instruct

date function help
i need help with date function

Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD H

How can use this array as a key?
Say I have this array for example:


print_r($array);

Prints:
Code: [Select]Array

Selecting an "empty" date formated field
How do you select an "empty" date field? I've tried the few ways I can think.
SQL> select

Giving the below syntax error
Dear Experts,

I have used 2 buttons in gui status as display and cjhange.When the user wi

How to calculate days from variable date?
This will be easy for one of you gurus. I want to fetch the date from a variable date, for example:<

url- go to webpage
i have an input text field and submit button.

how do i make the url entered into the textfiel

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