In the file guestbook.php
Replace this
$query = "
SELECT
`Guestbook`.`ID`,
DATE_FORMAT(`Date`, '$date_format' ) AS 'Date',
`IP`,
`Sender`,
`Profiles`.`NickName`,
`Recipient`,
`Text`,
`New`
FROM `Guestbook`
LEFT JOIN `Profiles` ON
`Profiles`.`ID` = `Sender`
WHERE
`Recipient`='{$owner}'
ORDER BY `Date` DESC
LIMIT {$from}, {$records_on_page}
";
with
$query = "
SELECT
`Guestbook`.`ID`,
DATE_FORMAT(`Date`, '$date_format' ) AS 'Date',
`IP`,
`Sender`,
`Profiles`.`NickName`,
`Profiles`.`ID`,
`Recipient`,
`Text`,
`New`
FROM `Guestbook`
LEFT JOIN `Profiles` ON
`Profiles`.`ID` = `Sender`
WHERE
`Recipient`='{$owner}'
ORDER BY `Date` DESC
LIMIT {$from}, {$records_on_page}
";
Then on line 222
Replace
getProfileLink($owner)
with
getProfileLink($records_arr['ID'])
This will solve your problem