In sample #1, I am able to intermix values called from a mysql database by changing the column name. You will notice I use ListingRid for the src= and alt= uses MLNumber.
<div id="loadarea" style="width: 400px; height: 300px;"><img width="400" height="300" src="http://www.mydomain/feeds/fmfl/rets_images/<?php echo(rawurlencode($row['ListingRid'])); ?>_1.jpg" alt="<?php echo(rawurlencode($row['MLNumber'])); ?>" align="left" border="0"></div>
Farther down in the page, i have a second sample here I have a block of PHP code and I need to change out the use of $MLNumber with $ListingRid but when I do the same thing and change the column name it does not carry the value through and I end up with just .jpg instead of the $ListingRid. What am I doing wrong and can you show me a sample so I can learn what the issue is?
<?php
$image = "<br>";
$img_cnt = 1;
$image .= "<a href=/images/$MLNumber.jpg rel=\"enlargeimage\" rev=\"targetdiv:loadarea,trigger:click\"><img src=/images/$MLNumber.jpg alt='' width='100' height='75' border='0' /></a> ";
?>
Where are you declaring
$MLNumber? In the first code sample you’re referencing the result set with$row['MLNumber']Do you have a line
$MLNumber = $row['MLNumber'];somewhere and just haven’t pasted it in this code sample or is it missing from your code?