yes same folder
the code that i have used from urs is in the exact format as below:
UNTITLED2.PHP
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META http-equiv="content-language" content="en">
<META name="author" content="Barand">
<META name="generator" content="PHPEd 4.5">
<title>Bar sample</title>
</head>
<body>
<table width="884" border='1'>
<tr>
<td width="122">
Item A </td>
<td width="58">
20 </td>
<td width="303">
<img src='bar.php?val=20&max=50' border="0"> </td>
</tr>
<tr>
<td height="42">
Item B </td>
<td>
40
</td>
<td>
<img src='bar.php?val=40&max=50'>
</td>
</tr>
<tr>
<td>
Item C
</td>
<td>
30
</td>
<td>
<img src='bar.php?val=30&max=50'>
</td>
</tr>
<tr>
<td>
Item D
</td>
<td>
50
</td>
<td>
<img src='bar.php?val=50&max=50'>
</td>
</tr>
</table>
</body>
</html>
bar.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
// set dimensions
$w = 102;
$h = 12;
// create image
$im = imagecreate($w, $h);
// set colours to be used
$bg = imagecolorallocate($im, 0xE0, 0xE0, 0xE0);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
$barcolor = imagecolorallocate($im, 0xFF, 0x00, 0x00);
// draw border
imagerectangle($im, 0,0,$w-1,$h-1,$black);
// get value and max value from query string
$val = isset($_GET['val']) ? $_GET['val'] : 0;
$max = isset($_GET['max']) ? $_GET['max'] : 100;
// calculate dimensions of inner bar
$barw = $max ? floor(($w-2) * $val / $max) : 0;
$barh = $h - 2;
// draw inner bar
if ($barw)
imagefilledrectangle($im, 1, 1, $barw, $barh, $barcolor);
// send image header
header("content-type: image/png");
// send png image
imagepng($im);
imagedestroy($im);
?>
</body>
</html>