I am storing passwords after bcrypting but user email ids as a plain text(without encrypting), because I want to send newsletters to that email ids regularly. I have got two questions?
How to secure the database so that email ids as the plain text in the database can be secured from hackers?
Is there any way to check the particular database table is only accesed by my web form not from outside?
note:I am new to database.
There's nothing wrong with storing emails in plaintext. Even if accessed they don't allow the attacker to access the accounts (provided the authentication works correctly). There's no reason to encrypt them unless you have some very specific requirements we don't know about.
If you want to secure your database in general: