search

Home  >  Q&A  >  body text

How to restrict login for a disabled administrator.

if (How to write this condition) {$result = 'Username has been disabled'; } else { $status = 1;$result = 'Verification passed, click [OK] to enter the background';

My idea is that after the logged-in user passes the verification, query the user's data table. If the status is 0, output the prompt information and return to the login page. I just can’t write, so I can’t start.

马维军马维军1716 days ago1153

reply all(1)I'll reply

  • WJ

    WJ2020-05-20 16:16:45

    Check the user's table to determine whether this field is 0. If it is 0, a prompt will be given and no login will be allowed. if($status == 0){echo "The user has been used by the police";die;}else{ Jump to the website The homepage of the background}

    reply
    0
  • Cancelreply