$_FILE upload question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
renzocj
Forum Newbie
Posts: 1
Joined: Tue Mar 15, 2011 2:48 pm

$_FILE upload question

Post by renzocj »

Is it possible not to use a submit button in a input file form ?

I would like that the visitor choose the file from his hard drive (using a form, input type="file"). When he decided what file he wants, the file must automatically be uploaded in to the server without the need of click a submit button after. The problem is that there is no more space to put a "submit button", the only thing is the "input file".

I am new to php, well I am trying to learn fast, so this situation is new to me. I am making a web related to translation services and the idea is that the visitor upload the file that they wanted to be translated (could be .txt. word..). in the main page there is a form with only one thing: the "input type file", when the visitor clicks and choose the file automatically I want to be carried to the contact page, there in this page the visitor must fill his name and all the personal information, but this is the issue: I would like that the file that he already chose and uploaded appears somewhere in the contact file, of course only the name of the file in order to confirm that the file was already uploaded to the server.

The information (personal info) of the visitor plus the attached file must arrive to the email of the translator.

Very easy eh ?

I know there is a lot of code here, but I just would like to know how to program the "input type file" in the form of the main page in order to upload the file without the need ot a submit button and how to redirect the page to the contact one after doing so.

Greetings, thanks for all the help in advanced.
Renzo
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: $_FILE upload question

Post by yacahuma »

just look php php file upload in google. there are so many good tutorials
Post Reply