Menu

Another image upload prob

Help
2009-06-22
2013-06-03
  • andrew tait

    andrew tait - 2009-06-22

    I've looked at many other posts but still cant figure this out.

    On my email i recieve the meesage ok, aulthough the message and image fields are missing. I get the following in my email for the image- No images get to that folder, I set permissions to 777

    Image:http://www.mysite.co.uk/files (origional filename)

    This is my processor.php
    <?php

    $where_form_is="http://www.mysite.co.uk/";

    // File upload handling
    if($_FILES['field_5']['name']!=''){
    $field_5_filename = "file_5_".date("sihdmY").substr($_FILES['field_5']['name'],strlen($_FILES['field_5']['name'])-4);
    if(!move_uploaded_file($_FILES['field_5']['tmp_name'], "./files/".$field_5_filename)){
    die("File " .  $_FILES['field_5']['name'] . " was not uploaded.");
    }
    }

    mail("sales@mysite.co.uk","phpFormGenerator - Form submission","Form data:

    Your Name: " . $_POST['field_1'] . "
    Company Name: " . $_POST['field_2'] . "
    Email: " . $_POST['field_3'] . "
    Message: " . $_POST['field_4'] . "
    Image upload: ".$where_form_is."files/".$field_5_filename." (original file name: " . $_FILES['field_5']['name'] . ")

    powered by phpFormGenerator.
    ");

    include("confirm.html");

    ?>

     
    • andrew tait

      andrew tait - 2009-06-22

      Never mind, I must've played about too much in dreamweaver. I installed a fresh downloaded zip and away it went.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.