well the information yuo gave is not very exhaustive, but to answer your questions:
yes you have to save the user/password somewhere in the scripts because otherwise how would you connect to the db ?
normally noone from outside (the internet) can read you php files if they are always named php, because all they will get is the stuff you generate in the script, not the script itself, that is interpreted by apache.
on the other hand, if you are on a multi-user server and the local file system rights are bad then someone else with an account on the server can just use telnet or ftp to download your files.
and last but not least, if you have your own mysql db you can create new users with less rights and different password to connect to the db. look at the mysql_setpermission script if you are using mysql, or at whatever came with your db. if you are in a shared environment then you're probably out of luck, talk to the tech support team.
mats
have more fun!