Помогите исправить
[code]<?php
session_start();
header("Content-type: image/png"

;
$chars = '0123456789';
for($i=0; $i<5; $i++)
{
$pos = rand(0, 9);
$str .= $chars[$pos];
}
$image = imagecreate (75, 20) or die ("ERROR"

;
$background = imagecolorallocate($image, 255, 255, 255);
$text = imagecolorallocate($image, 0, 0, 0);
imagestring($image, 35, 5, 0, $str, $text);
$_SESSION['code'] = $str;
imagepng($image);
imagedestroy($image);
?>[/code]
Сама ошибка Notice: Undefined variable: str in ляляля/www/core/captcha.php on line 9
если снимаю точку $str = $chars[$pos]; выходит 1 цифра а не 5 ((