Hi simon,
I'd suggest to move your database user
name and password into a protected configuration file and read these parameters into global php variables when you need them (make sure this configuration file is not
reachable from your web-site).
It is usually not a good idea to embed passwords in web files directly because of bugs and back-doors that exist in many web servers (including commercial ones like IIS).
For example - The IIS had a feature that allowed malicious users to retrieve the unprocessed .asp file and purview its contents (including any passwords) directly by appending a special "::$DATA" suffix to the .asp URL.
Hope this helps