As mentioned in the comments, you don't really have a secure setup going on. There are endless things to account for regarding security, but a good start would be to account for the following:
- Session Hijacking / Fixation
- SQL Injection
- XSS (Cross-Server Scripting)
- Brute Force attacks
A good beginner resource at first would be to check out phpacademy.
I've linked this a couple times also. I think it's a decent example of a PDO login system, which will help you avoid SQL Injection Attacks.
Assuming you have access to your php.ini
file, you may want to look into what these commands do. They may or may not fit your needs, but they can be helpful to avoid Session Hijacking / Fixation by not allowing the PHPSESSID variable to be passed via URL and also making it inaccessible via JavaScript.
session.use_only_cookies = 1
session.cookie_httponly = 1
session.use_trans_sid = 0
Brute Force attacks can be mitigated by using proper hashing. To Look into bcrypt or scrypt for more detail. You can also check out this discussion for a little more information on this.