is there a different way to do this
<?php
###################
##GET USERNAME##
###################
$AccountName = $_POST['username'];
##################
##CREATE IMAGE##
##################
$im = imagecreate(500,60);
$fg = imagecolorallocate($im,100,120,130);
$bg = imagecolorallocate($im,255,255,255);
$borc = imagecolorallocate($im,0,0,0);
imagefill($im,0,0,$bg);
imagerectangle($im,0,0,499,59,$borc);
##########################
##GET INFO TO MAKE SIG##
#########################
include("db.php");
$query = "(\"SELECT * FROM `silent_aggressions` WHERE AccountName='$AccountName' LIMIT 0,1\")";
$result = mysql_query($query);
$row = $result;
#######################################################################################
## Draw Variables Holding User's Information From Database, Since User Is On Team SA ##
#######################################################################################
$Line1 = "Username:";
$Line2 = $row["AccountName"];
$Line3 = "Team:";
$Line4 = $row["TeamName"];
$Line5 = "Keys:";
$Line6 = $row["TotalKeyCount"];
$Line7 = "Clicks:";
$Line8 = $row["TotalMouseClicks"];
$Line9 = "Rank:";
$Line10 = $row["Rank"];
$Line11 = "Team Rank:";
$Line12 = $row["TeamRank"];
########################################
## Pull Both RGB Colors From Database ##
########################################
$r1 = $row['r1'];
$b1 = $row['b1'];
$g1 = $row['g1'];
$r2 = $row['r2'];
$b2 = $row['b2'];
$g2 = $row['g2'];
#######################################
## Create Colors To Use In The Image ##
#######################################
$color = imagecolorallocate($im, $r1, $b1, $g1);
$color = imagecolorallocate($im, $r2, $b2, $g2);
#################
## Define Font ##
#################
$font = 'mckenzie.tff';
##############################################################
## Start Placeing User's Information Onto Image 84, 123, 84 ##
##############################################################
##################
## Col 1, Row 1 ##
##################
imagettftext($im, 15, 0, 7, 23, $color, $font, $Line1);
imagettftext($im, 15, 0, 65, 23, $color1, $font, $Line2);
##################
## Col 1, Row 2 ##
##################
imagettftext($im, 15, 0, 7, 52, $color, $font, $Line3);
imagettftext($im, 15, 0, 40, 52, $color1, $font, $Line4);
##################
## Col 2, Row 1 ##
##################
imagettftext($im, 15, 0, 165, 23, $color, $font, $Line5);
imagettftext($im, 15, 0, 197, 23, $color1, $font, $Line6);
##################
## Col 2, Row 2 ##
##################
imagettftext($im, 15, 0, 165, 52, $color, $font, $Line7);
imagettftext($im, 15, 0, 200, 52, $color1, $font, $Line8);
##################
## Col 3, Row 1 ##
##################
imagettftext($im, 15, 0, 275, 23, $color, $font, $Line9);
imagettftext($im, 15, 0, 308, 23, $color1, $font, $Line10);
##################
## Col 3, Row 2 ##
##################
imagettftext($im, 15, 0, 275, 52, $color, $font, $Line11);
imagettftext($im, 15, 0, 338, 52, $color1, $font, $Line12);
##################
## Finish Image ##
##################
imagepng($im);
###############################
##FINALLY DESTORY THE IMAGE!!##
###############################
imagedestroy($im);
?>