Show error messages to a user when database insert fails
You should not use the $errors globally, but use hooks in WordPress development. Since you are new to WP development, I will explain briefly how it works. What you should do instead: make a new hook, or use an existing one which you call at the location you want this error to appear in your … Read more