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
This also happened to me and the problem is that when you call the command INSERT
in your php file you must have specified another database.
In short, find where your INSERT command is and check the part your_database_name
below
"INSERT INTO \`your_database_name\`.\`your_table_name\`
That might solve your problem. Of course, if all privileges are granted for you.