I have a database table from which, when I select data with username and password, it works but when I insert some data in that table with same username and password it show
Check your SQL code.
And just delete dbName if you have.
Example:
insert into `dbName`.`tableName` ( columns ) values ( values );
Change to:
insert into `tableName` ( columns ) values ( values );