Dynamically generating an ” reference with PHP

I am not entirely sure what you are asking, but if you need a unique identifier based on posts created in WordPress, then use the post ID. Every post type is saved into the same table in the database so posts, pages, and custom post types will never have conflicting IDs.

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