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 Link to comment https://forums.phpfreaks.com/topic/14787-database_connectphp-help/ 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. Link to comment https://forums.phpfreaks.com/topic/14787-database_connectphp-help/#findComment-59334 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.