?
Solved

Webform and Mailer.php not sending images

Posted on 2011-09-21
2
Medium Priority
?
338 Views
Last Modified: 2012-08-14
I'm using mailer.php (modifed) to send form data and an image file attachment
       $FileName = $GUID . "." . $FileExtension;
      $ImagePath = "images/" . $FileName;
       copy($ImageFile, $ImagePath);
      $Attachment = chunk_split(base64_encode(file_get_contents($ImagePath)));

It works on one website but not another.
I've made sure the folder "images" exists however the image doesn't seem to show up in this folder (it does on the good website) so I suspect the issue is not with mailer.php but rather it is that the form is not uploading the image.

Does the copy move the image or copy it? there is no sign of the original in any other folder on either website.

The form was created in Dreamweaver here is the snippet
        <tr>
          <td><div align="left">Upload Your Photo</div></td>
          <td><div align="left">
            <input type="file" name="Image_File" id="Image_File" />
          </div></td>
        </tr>
So why should it work on one website but not the other and what can I do to resolve this issue?
0
Comment
Question by:kentgorrell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
dsmile earned 2000 total points
ID: 36577983
if the code is identical on both site, then you need to chmod folder images on the not-working-site to 0777 to allow php script to write to it.
In other words, try to set write permission for images folder
0
 

Author Closing Comment

by:kentgorrell
ID: 36578171
Yep that was it. Just right clicked on it via Filezilla and made the changes.
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question