Link to home
Start Free TrialLog in
Avatar of Cheryl Lander
Cheryl LanderFlag for United States of America

asked on

simple form issue

I have got a form which uploads a file, then emails the info to an email address.

But when I change the form to multi part (to handle the upload)
<form action="thankyou.php" method="post" enctype="multipart/form-data">

the file form element info doesn't appear in the email. Other form fields do. The file uploads perfectly.

I just need the file name to appear in the email (" . $_POST['attachment'].")

Form
+++++++++++++++++++++++++++++
<form action="thankyou.php" method="post" enctype="multipart/form-data">
<input name="attachment" type="file" id="attachment">
</form>

Thankyou.php
+++++++++++++++++++++++++++++
The following file has been uploaded.
Name: " . $_POST['attachment']."
ASKER CERTIFIED SOLUTION
Avatar of cx323
cx323

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you probably want to look in the upload code to move the file from the temp upload area.

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

Michael