Hi everybody, I am new to using databases over the net. My problem is as follows: I created a MySQL database in my site, and created a PHP3 class file with all the sqlconnect and SQL statments which i can call from other PHP3 files ,BUT in order to access the database I must write my USERNAME and PASSWORD in that PHP3 file which can be viewed by anybody or even downloaded. How can I make that PHP3 class file unaccessable by anyone but only me? OR is there a way to encrypt the USERNAME and PASSWORD? OR is there any other solution for that problem? Thank you
you could use an include file and place it out of reach lookup include() also if your setup is good you shouldn't have to worry about that
ideally, you must include the file in which your userid pwd are defined.
Also , put the file in a folder which is atleast one level above your public_html folder(on apache. for others equivalent of this). this will make it more secure
Isn't that exactly what Phil just said?