Programatically create multiple pages by passing in array of info

Your page id’s ($page_id) in your array are both -1. Have you tried making them unique?

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