<?php
include("/path/to/file/db.stuff.php"); // get your db stuff
$test=mysql_connect('localhost', $username, $password) or die('problem connecting');
?>
in the included file, have $username and $password defined to be the user you want.
ok. the path was becasue i'm using linux, so assuming you have a "PHP includes" folder in your "My Documents" folder...
include('C:\My Documents\PHP includes\my db stuff.php');
now, this means it's likely out of your web tree (good safety measure)...
now, this means it's like that file is at the front of your file that yo put that in. as long as you're not in a function you can use everything in taht file. that is where you put sensitive variables that you need for the database, and use that line to be able access it in your file
i'm with jam on this, butif you're thinking about a posix os for oracle (which is a sql based relational db) you might wanna look at solaris... solaris/oracle seems to be the most common combo for it