add attachment field to email form

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sticcino
User
Posts: 1043

add attachment field to email form

Post by sticcino »

Hi,

added the following to ewemail14.php to be able to send attachment with the message, don;t need to save it so there is no table field for it:

<div class="form-group">
    <label class="col-sm-2 control-label ewLabel" for="attachments"><?php echo "Attachments" ?></label>                                                                                           
    <div class="col-sm-10 controls"><input type="file" name="attachment" id="attachments"></div>
</div>    

why is there no "Attachments" field in the $_POST data ?, and how can I retrieve the filename so I can add it to the message with $Email->AddAttachment();

Johnny,


Webmaster
User
Posts: 9427

Post by Webmaster »

Read "Handling file uploads" here: http://php.net/manual/en/features.file-upload.php.


Post Reply