Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    file attachments

    Hi, i have a php script to send text form, but i would like to attach 3 photo accepting jpg / png files only. I try coding it myself but always get some error or it go through but i dont receive any in my inbox! I trying to send the files as an attachment to my inbox. Can someone help me out modfying the following codes?

    <?php

    $ip=@$REMOTE_ADDR;
    echo "<font face='Verdana' size='3'><b>IP Address= $ip</b>";
    $TS = date("l, F d Y h:i a",time());
    $salute = $_POST['salute'] ;
    $Name = $_POST['Name'] ;
    $Email = $_POST['Email'] ;
    $Type = $_POST['Type'] ;
    $msg = $_POST['msg'] ;


    $recipient = "email@domain.com";
    $subject = "Contact Form";

    $message = "Time Stamp: $TS \n";
    $message .= "IP: $ip \n";
    $message .= "Salutation: $salute \n";
    $message .= "Name: $Name \n";
    $message .= "Email: $Email \n";
    $message .= "Type: $Type \n";
    $message .= "Message: $msg \n";


    $headers = "From: email@domain.com";

    mail($recipient,$subject,$message,$headers);
    header( "Location: http://www.domain.com/hey.html" );

    ?>


    Thank you

  • #2
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post
    it would do you good to read this page: http://www.sitepoint.com/print/advanced-email-php


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •