How to add custom data to cart for a specific product which I have shown on a page programmatically and with a separate anchor adding it to cart?

How to add custom data to cart for a specific product which I have shown on a page programmatically and with a separate anchor adding it to cart?

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