Jump to content

Recommended Posts

I have another question, that I already had posted in here, but no one answer me  :'(.

 

I have a form that should be fill out be users and the form has a field to upload a file to the server, I have the upload code. Next the form should be processed to be sended by mail, to an email address. I have that code too.

 

What I need to know is the best way to do that, and how do I retrieve the file name information?

 

1) Should the user, first upload the file and then, when I already have the file in the server, ask the user to fill out the form;

 

2) Can I make the two things "in one" and submit the form with the file already uploaded to the email script?

 

3) There is a method to submit the form only to upload the file, and after that submit all form?

 

4) How can I retrieve the name of the file?

 

Thank you for your help.

 

Eduardo Ribeiro

Link to comment
https://forums.phpfreaks.com/topic/54987-help-with-upload-to-email/
Share on other sites

how do I retrieve the file name information?

http://us.php.net/features.file-upload

 

1) Should the user, first upload the file and then, when I already have the file in the server, ask the user to fill out the form;
You should have some sort of abstraction. Maybe just an inline frame. Just something where they won't have to fill out everything over again if the upload fails.

 

 

2) Can I make the two things "in one" and submit the form with the file already uploaded to the email script?
Emailing is a trivial thing in PHP. You can do it anytime, anywhere in your script. It's just one function (mail()).

 

3) There is a method to submit the form only to upload the file, and after that submit all form?
Ajax, inline frame, flash... Not really a PHP question.

 

4) How can I retrieve the name of the file?
http://us.php.net/features.file-upload
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.