syntax error, unexpected ‘while’ (t_while) please help :)

You’re missing a ; on this line:

$count         = strlen( $charset )

Should be:

$count         = strlen( $charset );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)