I have a server running a Debian os, and I have a multitude of .php scripts located in the default apache public directory. This is definitely not the most secure way to do this, but I have a script that will execute whatever $_REQUEST["sql"] says onto mysql database. You can only query this if you have the correct password, which is compared in plain text in the script.
My question is could an attacker somehow view this script and find the password, then execute sql statements at will?