Are you sure that the page code (the php for the page) actually creates the variables you want to use and that the postid for the first unread post is actually available for use - is pageinfo_lastpost.p an actual real variable that is defined on the page?