Attach Photo in formmail.php

I have created a form with name, phone, email, message and attach photo. When I fill out the form and email it back to me everything but the attach photo works. A friend told me that I'm trying to handle the photo attachment like the other fields and it won't work. Unfortunately he didn't have an answer for what would work. I've pasted the formamail.php file in question below. I want to be able to allow users to attach up to 8 photos. Any suggestions?
Thanks
Iainhttp://localhost/pinkg_local/formmail.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
<title>Email Form</title>
</head>
<body>
<?php
  $name=addslashes($_POST['name']);
  $phone=addslashes($_POST['phone']);
  $email=addslashes($_POST['email']);
  $comments=addslashes($_POST['message']);
  $photos1=addslashes($_POST['photos1']);
  $photos2=addslashes($_POST['photos2']);
  $photos3=addslashes($_POST['photos3']);
  $photos4=addslashes($_POST['photos4']);
  $photos5=addslashes($_POST['photos5']);
  $photos6=addslashes($_POST['photos6']);
  $photos7=addslashes($_POST['photos7']);
  $photos8=addslashes($_POST['photos8']);
// you can specify which email you want your contact form to be emailed to here
  $toemail = "[email protected]";
  $subject = "Consignment Photos";
  $headers = "MIME-Version: 1.0\n"
            ."From: \"".$name."\" <".$email.">\n"
            ."Content-type: text/html; charset=iso-8859-1\n";
  $body = "Name: ".$name."<br>\n"
            ."Email: ".$email."<br>\n"
            ."Phone:  ".$phone."<br>\n"
             ."Comments:".$comments."<br>\n"
                ."Photos1: ".$photos1."<br>\n"
              ."Photos2: ".$photos2."<br>\n"
               ."Photos3: ".$photos3."<br>\n"
                ."Photos4: ".$photos4."<br>\n"
                 ."Photos5: ".$photos5."<br>\n"
                  ."Photos6: ".$photos6."<br>\n"
                   ."Photos7: ".$photos7."<br>\n"
                    ."Photos8: ".$photos8."<br>\n";
  if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
    echo "That is not a valid email address.  Please return to the"
           ." previous page and try again.";
    exit;
    mail($toemail, $subject, $body, $headers);
    echo "Thanks for submitting your comments today";
?>
</body>
</html>

I gave up and bought a script. Best $29 I ever spent!

Similar Messages

  • Attaching photos as icons in mail

    Is it possible to set up mail to attach photos and pdf's as icons automatically? It is a real pain to have to convert each one individually.
    Martin

    Hello Martin.
    Not without a 3rd party plugin for Mail.
    You do know this has no effect whatsoever on how the attachments appear when the message is opened by the recipient?
    When selecting View as Icon for an attachment that appears inline or viewed in place within the body of the message and sending it this way to a Mail.app user, the attachment will appear inline or viewed in place within the body of the message when the message is opened by the recipient.
    Unless you use HTML with embedded images or objects in the message body, the sender of a message has no control over how attachments appear when the message is opened by the recipient. This is determined by the recipient's email client.
    http://lokisw.com/index.php?item=MailAttachmentsIconizer

  • Firefox won't display attached photos from photobucket in my forum

    Hi everybody,
    Me and other members of the [http://snowclub.gr/forums/index.php snowclub.gr] forum cannot see attached photos (e.g. [IMG]http://i380.photobucket.com/albums/oo247/ALCATRAZ_GR/IMG_2183_low.jpg[/IMG]) on the forum. I can see that the URL above is displayed as http://'''i3%38%30'''.photobucket.com/albums/oo247/ALCATRAZ_GR/IMG_2183_low.jpg and that kind of address is not recognized by Firefox.
    Any ideas on how to fix this?

    You can use the bookmarklet code to make the images visible if you do not see them.<br />
    The bookmarklet changes the URL of the images and converts the escaped characters to their real characters.<br />
    I don't know why the s380 get escaped if you upload the images.<br />
    Are you using the copy to clipboard on photobucket page to copy the IMG code to the clipboard?
    Does that also happen if you type the text instead of pasting the link text?
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode

  • I just noticed that I can no longer select photos out of my finder that are located in my Aperture/Iphoto Library.  I used to be able to attach photos to my gmail out of the aperture library in the finder and for some reason, no longer can.

    I just noticed that I can no longer select photos out of my finder that are located in my Aperture/Iphoto Library.  I used to be able to attach photos to my gmail out of the aperture library in the finder and for some reason, no longer can.
    I can't access these images except to go into the applications. 
    Also, I'd like to import my iphoto library into aperture, and move aperture library to an external drive.  I tried the import first, but there wasn't enough space.  Then I tried copying over the aperture library onto the external drive but it failed bc it said file was in use. 
    As it is, I only have 50gb left on my imac, and the aperture library is 150gb.  Also, I have over 10k images in both libraries combined and there are tons of duplicates that need to be sorted, and hopefully not messed up because I've organized most of them.
    So in short, I need to know how to do the following:
    -select photos in finder in aperture/iphoto libraries
    -move aperture library to live on external drive
    -import iphoto library into aperture library
    -eliminate dups but maintain organization
    -moving forward i need a better workflow so that I import images from camera, and can organize right away into albums rather than creating projects by default and then creating albums so essentially the photos are in 2 different places, even tho they are referenced
    -live happily ever after
    Thanks in advance for any support you can offer!!

    If you're using apps like iPhoto or Aperture then they replace the Finder for managing your photos. The point is that you use the (many) options available via these apps for the things you want and need to do with the Photos.
    So, simply, you don't select the photos in the Finder. I'll append the supported ways to do this - which are faster and will yield the current version of your Photos - to the end of this post.
    -move aperture library to live on external drive
    Managed or Referenced Library? Managed -
    Make sure the drive is formatted Mac OS Extended (Journaled)
    1. Quit Aperture
    2. Copy the Library from your Pictures Folder to the External Disk.
    3. Hold down the option (or alt) key while launching Aperture. From the resulting menu select 'Choose Library' and navigate to the new location. From that point on this will be the default location of your library.
    4. Test the library and when you're sure all is well, trash the one on your internal HD to free up space.
    Referenced -  relocate your Masters first.
    These issues are covered in the Manual and on this forum hundreds of times.
    -import iphoto library into aperture library
    FIle -> Import -> iPhoto Library? Have you done this already? If so are you trying to move the Masters to Aperture from an  iPhoto Library? Or Consolidate them?
    -moving forward i need a better workflow so that I import images from camera, and can organize right away into albums rather than creating projects by default and then creating albums so essentially the photos are in 2 different places, even tho they are referenced
    You can't. Every photo is in a Project.  They’re the basic building blocks of the Library.
    You might want to spend a little time with the manual or the video tutorials. I'm not sure you've grasped the app  you've purchased.
    The following is written for iPhoto, but about 97% works for Aperture too.
    There are many, many ways to access your files in iPhoto/ APerture:   You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics. This is what you use to attach your shot to your GMail
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    There's a similar option in Outlook and many, many other apps.  If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto/ Aperture.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    If you want to access the files with iPhoto/ Aperture not running:
    For users of 10.6 and later:  You can download a free Services component from MacOSXAutomation  which will give you access to the Library from your Services Menu.
    Using the Services Preference Pane you can even create a keyboard shortcut for it.
    or use this free utility Karelia iMedia Browser

  • Trouble attaching photos....

    Hello,
    I am having an issue in being able to attach photos to emails.
    When using Mail, if I choose to attach files (photos) to the email, the following dialogue box appears (as expected!):
    However, there is no way to browse through and select different photos as required. Instead, I tried to select 'photos' from the Media location in th eleft hand menu. Again, another dialogue box, slightly different this time:
    It says to open iPhoto.... but even when it is already open, the photos do not appear in the list as it suggests they should.
    I appreaciate there are other ways of attaching photos, but they arent as staright forward as far as I know! And this is quite frustrating!
    Can anyone help?
    Many Thanks in advance....
    Regards
    Ian

    That's not how you find the photos in an iPhoto library to add to an email.  Use the Media Browser that's in the new mail tool bar. 
    If it's not there then go to the View  ➙ Customize Toolbar menu and add it.
    Or, after setting up Mail as your email client in iPhoto's General Preference pane,
    select the photos you want to email use the Share buttons and select Email
    For more info on accessing photos in an iPhoto liblrary see this User Tip by Terence Devlin. It is the best treatise on How to Access Photos (for use outside of iPhoto):  How to Access Files in iPhoto
    NOTE: you should not access the photos in the iPhoto library from the Finder as you have in your screenshots. That can easily cause damage/corruption to the library.
    OT

  • Using Firefox 4.0 sometimes I can attach photos to email and most often the Attach feature doesn't work. How can I fix this?

    I have Firefox v4.0.1
    If I restart my laptop or my Desktop, both with MS OS, my email, AT&T Yahoo, Firefox browser, will allow the attach feature, for photos to work for a few photos. The when I click to attach another photo, nothing happens. At first I was trying to attach several photos at once. That didn;t work at all. Then I tried attaching one at a time. I thought I had solved the problem because that will work if I retart first. But then not. This is a problem that could make me go back to using IE. I need to be able to attach photos! By the way, I didn;t have this problem before I upgraded to v4.0.

    If you have problems with updating then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the DMG file to the desktop
    * Firefox 4.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

  • Is it possible to attach photos to a form prior to submission?  For example, if I have an employee in the field completing a property inspection, can photos of the property be submitted along with the form?

    I have to inspect properties for my business and have created a form that describes the condition of the property.  This form is great for my agents in the field, however, it would be really great if they could attach photos of the property to accompany the submission.  Is this possible?  Can it be considered on the wish list?

    Hi,
    Yes, you can create a file attachment field in the form and have your employee upload the pictures.
    Thanks,
    Wenlan

  • Cant attach photos to email since i got iOS 8

    I uploaded iOS 8 when it came out. Since then I have been unable to attach photo's to emails.

    Same here also. IOS and all apps up to date. Gen 2 iPad. Will not attach photos in webmail for Hotmail, gmail or Yahoo mail.
    Nothing. They all act like they are attaching the file but just sit and the status icon just spins, and spins, and spins. 
    Before IOS 8, there never was a problem....Makes me glad I'm using and Android phone.

  • Cant attach photos to email after "upgrade" to Photos...why?

    HI,
    So recently Apple updated (hijacked) my iPhoto app on my computer with their "new and improved" Photos software.  While is good to have some long needed features like a useful file system, I seem to have lost some core functionality.  I use Outlook as part of Office for Mac and can no long attach photos to emails.  Yes, I know Apple and Microsoft hate each other and neglect if not sabatoge each other's stuff, but attaching a photo/image to Outlook email seems to be basic functionality Apple left out. 
    PLease discuss this and let me know if I'm missing something simple or how I might be able to fix this major problem.  Otherwise how do I downgrade my software to the last iPhoto version so I can once again send an image over email.
    i Realize that Apple may not have done this intentionally, but I never volunteered to be a beta tester for their new software.  Apple is niave if they think people don't use MS Office on Macs.  BTW, I have 3ipads, 3 macs, 2iphones and just purchased 4 watches...I hope there is an easy fix for this.
    THanks!
    Jeff

    Nothing was hijacked. iPhoto is still on your Mac in the Applications folder. It was just replaced in the Dock with Photos during the 10.10.3 installation.  If you were running iPhoto 9.6.1 you can still use it with your iPhoto Library.
    It's MS's responsibility to update Outlook so it can work with Yosemite and Photos, not Apple's  The same goes for all of the may other applications. It's the developers of those apps that must do the job. So don't blame Apple for their dropping the ball.
    And remember upgrading to Yosemite was entirely voluntary on your part.
    If you don't have iPhoto 9.6.1 then you can get it by following Terence Devlin's method in this post:
    Terence Devlin including Apple logo changes for feature 126 Apple image including Apple logo changes for feature 126 Apple image ends here
    Apr 14, 2015 11:21 AM
    Re: Is Iphoto gone ? i want it back!
    in response to Johannes666
    Recommended
    [DocumentBodyStart:d25bf602-029a-4466-b895-2ab6c98bb4c9]
    Go to the App Store and check out the Purchases List. If iPhoto is there then it will be v9.6.1
    If it is there, then drag your existing iPhoto app (not the library, just the app) to the trash
    Install the App from the App Store.
    Sometimes iPhoto is not visible on the Purchases List. it may be hidden. See this article for details on how to unhide it.
    http://support.apple.com/kb/HT4928
    One question often asked: Will I lose my Photos if I reinstall?
    iPhoto the application and the iPhoto Library are two different parts of the iPhoto programme. So, reinstalling the app should not affect the Library. BUT you should always have a back up before doing this kind of work. Always.

  • I can't get formMail.php to recognize my simple Spry Radio Group button

    I don't know php at all, but I have a dreamweaver form that sends its information to a document called "formmail.php" and that sends the email to me.
    I was able to add text fields by duplicating the text field code in the formmail.php file and it does work, BUT i don't know what code should be on the file to process the radio button information. The radio button group is made up of 2 buttons "Yes" and "No"
    This is a abbreviated version of "formmail.php"
    <body>
    <?php
      $name=addslashes($_POST['name']);
      $address=addslashes($_POST['address']);
      $email=addslashes($_POST['email']);
      $radioGroup1=addslashes($_POST['arrangements']);
      $comments=addslashes($_POST['message']);
    // you can specify which email you want your contact form to be emailed to here
      $toemail = "[email protected]";
      $subject = "From the VFS website";
      $headers = "MIME-Version: 1.0\n"
                ."From: \"".$name."\" <".$email.">\n"
                ."Content-type: text/html; charset=iso-8859-1\n";
      $body = "Name: ".$name."<br>\n"
                ."Address: ".$address."<br>\n"
    ."Email: ".$email."<br>\n"
    ."Have you made pre-arrangements?: ".$radioGroup1."<br>\n"
                ."Comments:<br>\n"
                .$comments;
      if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
        echo "That is not a valid email address.  Please return to the"
               ." previous page and try again.";
        exit;
        mail($toemail, $subject, $body, $headers);
        echo "Thanks for submitting your comments";
    ?>
    </body>
    </html>
    And this is what the code for my Spry Radio Group button is looking like.
    <p id="arrangements"><span id="spryradio1">
                                          <label>
                                            <input type="radio" name="RadioGroup1" value="Yes" id="RadioGroup1_0">
                                            Yes  </label>
                                          <label>
                                            <input type="radio" name="RadioGroup1" value="No" id="RadioGroup1_1">
                                            No</label>
                                            <br>
                                          <br>
    </span></p>
    Please help - I'm lost!

    The post form method gets a variable, by name and sends that value to your processor.  You have called $_POST['attachments'] which is the name of the container <p> tag and not of the radio group.  So change:
    $radioGroup1=addslashes($_POST['arrangements']);
    to
    $radioGroup1=addslashes($_POST['RadioGroup1']);
    That changes the <p> arrangements to the RadioGroup1 which is the name you gave the radio group.

  • Cannot attach photos to email in iOS 8.0

    After upgrading to iOS 8.0, I can not attach photos to my emails.  This has never been a problem before the upgrade.

    Which mail client are you using?
    Can you mail directly from the Photos.app using the "Share" options?
    Apps, that have not been updated to iOS 8 compatible versions cannot see all photos, only the photos in the "Recently added" album. As a work-around send photos directly from the Photos.app or add the photos to an album. Then other apps should be able to access the photos. There is also a bug with accessing photos by third-party apps that will be fixed in the next iOS8 update.

  • AdBlockPlus is preventing me from attaching photos to emails I want to send via gmail - How do I correct this?

    ''locking as a duplicate - https://support.mozilla.com/en-US/questions/877475''
    Quite some time ago I switched to Mozilla Firefox, and installed AdBlocker. Have had NO ads since then and have been very happy with it. Ever since I've had AdBlocker, when I go to attach a file to an email I'm about to send in gmail, I see a little word "Block" pop up over "Attach a file". I just always ignored it. Now, however, I find I am unable to attach photos I want to send. When I click on that little word "Block" I get a whole menu that I don't really understand titled Add AdBlock Filter Rule. It shows this in the "New Filter" field at top: "||mail.google.com/mail/uploader/*. Under that a "Blocking Filter" radio button is selected, and under, under "Look for "Pattern", I see the item "mail.google.com/mail/uploader/*" is selected. At the bottom of the screen is a radio button "Custom" that has https://mail.google.com/mail/uploader/uploaderapi2.swf after it, but that button is not selected. I just removed all custom filters in an attempt to get rid of whatever is disallowing me to attach photos. But that didn't work. Any ideas? I'm lost

    BTW, I should have said AdBlockerPlus above - I have ABP, not just AB.

  • Email attachment photos not appearing as thumbnails

    When I receive a Yahoo email using Safari, the email attachment preview photos appear as a grey box with an inner blue box with a question mark in the middle. When I checked my Yahoo email using Firefox, the email attachment preview photos also do not appear. They show up as a gray box with a broken image icon in the upper left corner. The difference between the two is that in Safari, I am unable to download the pictures and view them at all. Get a securedownload thing. In Firefox, I am able to download the pics successfully. The preview photos (thumbnails) used to appear at the bottom of my email messages and I was able to click on them and download. My question is: How do I fix this problem of not being able to view the attachment photo previews (ya know the ones beside the words "Scan and save this photo to your computer"?

    Hi Lisa
    Strange this would occur on both browsers. This may be another Yahoo problem. Last night, images did not appear in my Yahoo Mail. This morning they are back. Do you still see the problem? If you do...
    Are you seeing the image problem on other web site pages, or is this specific to Yahoo? If occurring on various web sites in Safari usually indicates the "display images when page opens" box is not checked in the Safari Preferences>Appearance panel. The counterpart setting in Firefox would be Content>Load Images Automatically.
    If not, are you using any 3rd party Internet blocking software?

  • How can I get to see attached video, How can I get to see attached photos sent from my iPad in a normal browser mail?

    Let me elaborate: I sent a photo from the mail app my iPad has and I sent it to myself. When I receive the mail I get to see the attached photo on the mail app but when I get to look it on a normal browser FROM the iPad I doesn't appear. However when I do get to see the mail from a browser from any other device I can get to see the photo. Please help!!

    Whoever provides you web access to your email may suppress photo viewing on mobile devices. You should check with them. (E.g., ask Google if it's Gmail, ask your ISP if it's your ISP's webmail viewer, etc.)

  • How can put photo comment in Facebook in safari or other browser, am using ipad 4 and this was working perfectly but unfortunately it's not working now..the attach photo feature is there but can't attach, please help me in this

    How can put photo comment in Facebook in safari or other browser, am using ipad 4 and this was working perfectly but unfortunately it's not working now..the attach photo feature is there but can't attach, please help me in this

    How can put photo comment in Facebook in safari or other browser, am using ipad 4 and this was working perfectly but unfortunately it's not working now..the attach photo feature is there but can't attach, please help me in this

Maybe you are looking for

  • Photos are Missing messages Problem constantly showing up

    I screwed up. I had iPhoto link to my photos on my hard drive rather then importing/embedding them into the iPhoto library but then I believe I reorganized all my original folders (merging, file renaming etc.). So that is one reason I am getting miss

  • Laggy scrolling/animations and tricky touchpad on MacBook Pro w/Retina Display

    As much as I loved the form factor and screen on the 15" 2.6ghz MBP w/Retina Display, the laggy scrolling, animations and intermimitently non-functional tap-to-click made me return it to Best Buy. A $3000 computer (after tax) shouldn't have problems

  • Call standard adobe form from a WD application

    Hi All, I have a requirement of displaying a standard adobe form from a click of a button in a WDA portal, I am an ECC developer and have no idea of WD. I created a function module which uses submit statement to invoke the driver program and displays

  • Error message : BME-99003 ???

    please anyone help me, what this is all about??? and how to solve it... BME-99003: An error occurred, so processing could not continue. The application has tried to de-reference an invalid pointer. This exception should have been dealt with programat

  • OSS note containing fixes for ITS 6.20 patch 19

    What is the OSS note that tells of the fixes for patch 19? Thanks, Jin Bae