Can you provide more information and let us see the code? (Remove the database login details before posting)
Is it a local or remote database you're trying to connect to? Are you using a mySQLi connection? CS6 is very old now so not sure if that may be an issue.