knox Posted July 16, 2006 Share Posted July 16, 2006 Hi Guys - I do not know very much about PHP and MySQL and I have seem to have a problem.How am I supposed to create database_connect.php? What has to be inside of it? I'm very confused.Thank you so much Quote Link to comment Share on other sites More sharing options...
king arthur Posted July 17, 2006 Share Posted July 17, 2006 Something like[code]$dbc = @ mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die ("Could not connect to mysql:" . mysql_error());@ mysql_select_db(DB_NAME) or die ("Could not select the database" . mysql_error());[/code]where DB_HOST is usually localhost, DB_USER, DB_PASSWORD are the username and password needed to connect, and DB_NAME is the name of your database.HTH. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.