I have the following script.
<? header(“Content-type: image/jpeg”);
$im = imagecreate(50,100);
$bg = imagecolorallocate($im,255,255,255);
$fg = imagecolorallocate($im,100,120,130);
$borc = imagecolorallocate($im,0,0,0); imagefill($im,0,0,$bg);
imagerectangle($im,0,0,99,99,$borc);
imagestring($im,1,20,45,”Hello World”,$fg);
imagejpeg($im); imagedestroy($im);
?>
Now I have the following script to get information out of a database
<?
include('inc/config.php'); ?>
<b>Last Song played, Author, and When Played</b>
<?
$result = mysql_query("SELECT * FROM `historylist` ");
echo "<table>";
while ($row=mysql_fetch_assoc($result)) {
$date_played=$row['date_played'];
$title=$row['title'];
$artist=$row['artist'];
echo "<tr><td>
$date_played - $name</td>
</tr>";
}
echo "<table>";
?>
How would I combine the two scripts to make an image of what I last played?
Basically what I want the image to be is this
|------------------------------------------|
|Song Last Played: <enter song last played> |
|------------------------------------------|
that is close enough