-3

So i'm getting this strange error when I should not be recieving this error? Can anyone help me out here?

Error:

Parse error: syntax error, unexpected ';' in /home1/hclearne/public_html/database/include/image/16.php on line 9

Code:

<?php 
$img = imagecreatefrompng( 'http://i.imgur.com/7MULEJs.png' );
$test = imagecolorallocate($img, 0, 255, 0);

imagestring($img, 5, 250, 45, 'UID: $UID', $test );
imagestring($img, 4, 250, 65, 'Rating: $input ', $test );

header('Content-type: image/png');
imagepng(imagecreatefrompng($img);
imagecolordeallocate($img, 0, 255, 0);
imagecolordeallocate($img, 32, 32, 32);
imagedestroy($img);
?>
Darren
  • 13,050
  • 4
  • 41
  • 79

1 Answers1

2

It's no strange error, you haven't closed your imagepng() function off, you're missing the closing ).

imagepng(imagecreatefrompng($img));

Hence why it says "Unexpected ';'" - Cause it was expecting the closing parenthesis ;-)

Darren
  • 13,050
  • 4
  • 41
  • 79