HI. The following code from the beginning of an html email works in a dynamically generated email to insert a fixed image. When I replace the end of the image URL string to try and make it dynamic, I cannot get it to work. My replacement string is at the end of the working code. Can anyone tell me what I am missing (probably a lot:) Many thanks.
<?php
$id = $row_rsucites['Item_Num'];
$to = $row_rsucites['Email1'] . " , ";
$to .= $row_rsucites['Email2'] . " , ";
$to .= $row_rsucites['Email3'];
$subject = "Sample Subject";
$headerPic = '<IMG src="http://sample.com/Sections/uctionItems/photos/photo.jpg">';
$body = "<html><body>" .
"<h2><center>With Compliments: From Sample.com!<br><br>
Sample Text!</center></h2>" .
"<p><center>$headerPic</center></p>" .
My attempt at dynamic image by replacing the $headerPic line photo.jpg at the end with dynamic bla bla is:
$headerPic = '<IMG src="http://sample.com/Sections/uctionItems/photos/$row_rsucites['Image_URL'];">';
where the dbase field Image_URL holds .jpg photo names which are stored in the folder photos
Any help would be greatly appreciated!