$dbConnect=mysql_connect($dbHost,$dbUser,$dbPassword);
mysql_select_db($dbName,$dbConnect);
mysql_query("set names utf8");
Let’s suppose I am a employer who works with some PHPers.who are employed.
I know the value of the variable $dbPassword. and I don’t want that the PHPers who work with me not to know the value of the variable $dbPassword.
Does it make sense?
if it makes sense, how can I do it?
You cannot.
PHP needs your password to connect so, you have to provide it somehow.
Anyone who can access your code will see the password.
There is a deeper question here, do you have a Dev environment, a test environment, a production environment? Only a production environment?
The short answer is, sure you can. You simply don’t include the file that sets $dbPassword in your repo. Then they have to create said file locally and use it against their local database for development purposes. That file should then be automatically deployed when you move your code from the repo to each environment (test/production).
But without knowing exactly what you are attempting to do, or what type of environment you have setup, it is hard to give you an answer.