Echo variable in mysql field

Last question from me for today… I promise…

I can’t seem to figure out how to echo a php variable in a mysql field.

I have a list of php variables defined in the header of a document like this

$var1='red'; 
$var2='blue';

etc.

and simply using

<?php echo $content; ?>

in the mysql field doesn’t work… nor does this

<?php eval($var1); ?>

or

<?php eval('?>' . $var2. '<?php '); ?>

am I doing something wrong?

Perhaps you can’t echo a php variable in a mysql field?

Thanks as always

-Robert

Sponsor our Newsletter | Privacy Policy | Terms of Service