I'm using php and mysql to develop an application; A little background data about it,it's a login system which stores usernames and passwords and all the works that a login system does. However I have ran into a problem when it comes to deleting users, the function for deleting users works fine but the problem is For example the administrator can delete himself leaving the database with no user. So what I would want to do is when I am on the main page, a function runs to check if a specific username exists
//Example:
Table name: users
columns: username, password
default username and password I want to always remain in table 'users'
username=dames and password=:password
//End of Example
and if not add the username and password and also if the default username and password has been updated it inserts the default username and password, and and not deleting the updated one. I hope I made it clear enough because id really appreciate some help and suggestions.Thanks