...

View Full Version : file attachments



ThorH
12-31-2005, 06:28 AM
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

thesavior
12-31-2005, 10:42 PM
it would do you good to read this page: http://www.sitepoint.com/print/advanced-email-php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum