I have a background image stored in a field called background and it shows up fine on a page using the following:
Code: Select all
echo $row['background'];Code: Select all
echo "<td width='100%' background='".$row['background']."'>";Then, I tried:
Code: Select all
$FixedBack = htmlentities($row['background']);
echo "<td width='100%' background='".$FixedBack."'>";I also tried escaping php except for the variable itself:
<td width="100%" background="
Code: Select all
<?php echo $row['background'] ?>Then finally I repeated the latter approach but after using the htmlentities function:
Code: Select all
$FixedBack = htmlentities($row['background']);
?>
<td width="100%" background="<?php echo $FixedBack ?>I'm a php newbie, however I'm puzzled because it seems to me that most of the ploys I've tried above have worked for me in other circumstances --
So thanks in advance for any ideas on what I'm doing wrong.
Brian