hey there, for some extra marks in a class i'm trying to use the gd library to create a start for the purpose of a 5 star rating instead of just using png's stored in a folder. i believe i had the code correct but it is not working for some reason. any help? thanks!
//set up array for point in star
echo "star start";
$values = array(
array(0,5),
array(5,5),
array(7.5,0),
array(10,5),
array(15,5),
array(10,9),
array(5,9),
array(7.5,10),
array(2,15),
array(13,15),
);
//create image
$img = imagecreatetruecolor(15,15);
//colors
$bg = imagecolorallocate($img,255,255,255);
$black = imagecolorallocate($img,0,0,0);
//draw star
imagefilledpolygon($img,$values,5,$black);
//flush image
echo "star end";