I have a database which contains my color definitions for GD2 in the format:
ColorName, Red, Green, Blue
Example:
Red, 255, 0, 0
I am pulling the values from the database and want to assign them via GD2"imagecolorallocate", I just can't seem to get my head around it today so please help if you can... This is the code I have so far.
PHP Code:
SQL="Select * From Colors"; $ColorValues = mysql_query($SQL); while $Values = mysql_fetch_array($ColorValues) { $ColorName = $Values["Name"]; $Red = $Values["Red"]; $Green = $Values["Green"]; $Blue = $Values["Blue"]; }
|