All,
I'm trying to pass a hidden value into my php mail script - the img1 isn't displaying - in the e-mail it's coming across with just http://www.mysite.com/custom_clock/sills/ and not the img1 value
The html form is here:
<form name="customemail" action="mail.php" onsubmit="return SubMail_Validator(this)" method="POST">
<b>E-mail</b><br/>
<input type="text" name="from" size="25"><br>
<input type="hidden" name="imageTwo" id="imageTwo" value="<?php echo $_REQUEST['show_image']; ?>"/>
<input type="hidden" name="imageOne" id="imageOne"/>
<input type="image" src="../images/buy_green.jpg" border="0"><p>
</form>
The mail script is here:
<?php
$to ="admin@mysite.net";
$from = $_POST['from'];
$msg = $_POST['msg'];
$img1 = $_POST['imageOne'];
$img2 = $_POST['imageTwo'];
//Image in e-mail
$sillimg = '<a href="http://www.mysite.com/"><img src="http://www.mysite.com/custom_clock/sills/'.$img1.'" class=imageOne imageOrig></a>';
$mailimg = '<a href="http://www.mysite.com/"><img src="http://www.mysite.com/custom_clock/images/'.$img2.'"></a>';
//Mail Body - Position, background, font color, font size...
$body ='
<html>
<head>
<style>
<!--
body, P.msoNormal, LI.msoNormal
{
background-position: top;
background-color: #336699;
margin-left: 10em;
margin-top: 1em;
font-family: "verdana";
font-size: 10pt;
font-weight:bold ;
color: "000000";
}
.container {
position: relative;
}
.imageOrig {
position: absolute;
}
.image {
position: absolute;
}
.imageOne {
z-index: 0;
}
.imageTwo {
z-index: 1;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
opacity: 0.5;
}
-->
</style>
</head>
<body>';
//To send HTML mail, the Content-type header must be set:
$headers='MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To: System Admin <oneillwebsite@verizon.net>' . "\r\n";
$bodys .= "<div class='container'>";
$bodys .= "<table border='0'>";
$bodys .= "<tr>";
$bodys .= "<td valign='top' align='top'>";
#$bodys .= "<img name='hidimgSrcOrig' id='hidimgSrcOrig' class='imageOne imageOrig'>";
$bodys .= "$sillimg";
$bodys .= "$mailimg";
$bodys .= "<br/>";
$bodys .= "</td>";
$bodys .= "</tr>";
$bodys .= "</table>";
$bodys .= "</div>";
$bodys .= "A custom image has just been uploaded<br><br>";
$bodys .= "$from";
$bodys .= "<br>";
#$bodys .= "$mailimg";
$subject .="Custom Image";
$body .= $bodys . "</body></html>";
mail($to, $subject, $body, $headers);
?>