Well assuming that you are even connecting to the mysql server properly then mysql_select_db('databasename'); should be all you need. It will use the last successful connection to the database.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||