if conditional in sidebar plugin Password content shortcode

Two ways you can do that,

  1. You can write a new short code for e.g [check_sumbit] and then use it in side bar, and that short should check if form is submitted correctly

  2. You can use php code as you mentioned in your question using some plugins that allow php code in widgets. For e.g.
    https://wordpress.org/plugins/php-code-widget/

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