Help with commenting system

If you are creating this code to learn WordPress then I applaud you, otherwise you should use a plugin (just a suggestion).
Plugins take all the work out of these things. Here is a list of some good WordPress plugins for commenting.

Disqus Comment System: Disqus is a popular external commenting system that replaces the default WordPress comments. It offers social media integration, great spam filtering, and an engaging user interface. It’s an excellent choice if you’re looking to enhance user interaction and community building on your site.

Jetpack Comments: This module of the Jetpack plugin replaces your default comment form with a new form where users can use their social media accounts to comment. It’s a good choice if you’re already using Jetpack and want a simple integration with a minimalist approach.

wpDiscuz: This plugin is a great alternative to Disqus. It’s a fully AJAX-powered commenting system that integrates with your WordPress comments. It offers a real-time comment system, customizable comment forms, and is designed to improve user engagement.

Akismet: While primarily a spam-fighting plugin, Akismet also enhances your comments section by filtering out spam. It’s essential for any WordPress site to keep the comments clean and relevant.

CommentLuv: This plugin encourages readers to comment by offering them a link to their last blog post at the end of their comment. It’s a great way to increase engagement and reward your commenters.

Thrive Comments: This is a premium plugin that turns your comment section into a conversion-focused area. It offers features like upvoting, downvoting, and social media integration. It’s great for creating a more engaging and interactive comments section.

Simple Comment Editing: This plugin allows anonymous users to edit their comments for a limited time. It’s an excellent addition for enhancing user experience in the comment section.

Each of these plugins has its strengths, so the best choice depends on your specific needs and preferences.

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