Posted June 26 '09 at 10:10 PM
Posts: 4
Hello everyone, i hope my spelling isnt to bad to understand.
Ok lets start, Ive made a basic form in dreamweaver CS3, Then i had a go at codeing a php script that when someone enters the infomation posted on the form it goes into my domain/sever Email account, the info they have entered shows, all correct ect..
now i want them to beable to send me files, Images. but my coding wont work..
what ive done here is added the image tags there, for the php script. and also on my forms in dreamweaver HTML file format i added the File Field and called the tag image1 - then image2 - then image3... but when it comes into my email it does this. Item image1: /tmp/phpPRkkIb
Item image2: /tmp/phpPRkkIb
Item image3: /tmp/phpPRkkIb
ive hiden my email.. so that would change...
HELP ive been trying for hours n hours
<?php
/* Subject and Email Variables */
$emailSubject = 'contacts';
$webMaster = 'Hidenemail@Email';
/* Gathering Data Variables */
$itemnameField = $_POST['itemname'] ;
$disField = $_POST['dis'] ;
$priceField = $_POST['price'] ;
$postField = $_POST['post'] ;
$locationField = $_POST['location'] ;
$emailField = $_POST['email'] ;
$phoneField = $_POST['phone'] ;
$image1Field = $_POST['image1'] ;
$image2Field = $_POST['image2'] ;
$image3Field = $_POST['image3'] ;
$agreeField = $_POST['agree'] ;
$body = <<<EOD
<br><hr><br>
Item name: $itemname <br>
Item Dis: $dis <br>
Item Price: $price <br>
Item post price: $post <b>
Item location: $location <b>
Item email: $email <b>
Item number: $phone <b>
Item image1: $image1 <b>
Item image2: $image2 <b>
Item imagr3: $image3 <b>
Item location: $location <b>
Yes i agree: $agree <b>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail ( $webMaster, $emailSubject, $body, $headers ) ;
/* Results rendered as HTML */
$theResults = <<<EOD
<!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" />
<title>Thanks </title>
<style type="text/css">
<!--
.style2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #666666;
}
.style3 {
color: #990000
}
.style4 {color: #333333}
-->
</style>
</head>
<body>
<div>
<div align="left" class="style2">
<h2 class="style3">THANK YOU FOR <span class="style4">CONTACTING US</span></h2>
</div>
</div>
<p> </p>
<div>
<div align="left" class="style2">Thank you for your interest! Your email will be answered very soon!</div>
</div>
<br />
<br />
<div>
<div align="left" class="style2"><a href="home.html" class="style3">Return back >></a></div>
</div>
<p> </p>
</body>
</html>
EOD;
echo "$theResults" ;
?>