I am using an example from the article sectins, and need to change the backround color to black. I have the color allocated, but I cant find where I need to change it.
Does somebody have an example on changing the backround color?
Bill
I am using an example from the article sectins, and need to change the backround color to black. I have the color allocated, but I cant find where I need to change it.
Does somebody have an example on changing the backround color?
Bill
is the color hard coded in the script? or are you extracting it from a db?
when you say background color, where? for the page? a table?
<?
// extract color from db
$result=@('SELECT bgcolor FROM table_name') or die('<b>Doh!</b>');
$bg_color = mysql_result($result,0);
// to change the bg of the page
echo '<body bgcolor='.$bg_color.'>';
?>
hope this helps
djloc 286
Hello,
Thanks, but I mean change the backround color for the image I am creating using imagecreate()
Bill
awww, hence the GD =) gotcha, must have missed that the first time! have you tried
http://www.php.net/manual/function.imagecreate.php
there are some good examples there of changing the colors.
djloc286