I have couple of mysql queries in PHP and at the end of each query I did this
mysql_query(STRING) or die(mysql_error());
This is fine as far as I am in DEV environment but I dont want production users to see these errors. Any good Idea to remove this messages by just setting ON OFF.
mysql_*functions in new code. They are no longer maintained and are officially deprecated. See the pink box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.