Friends this is a basic code just to give you a knowledge how we can code a login panel, It is recommended to take this code as a learning point of views and basic structure and develop the high level code using this as a base.
You can also encrypt the password before saving to database so no one can read the password.
You can also make it secure from the SQL Injection, all you need is to make some minor modification into this code and that is it.