Jump to content

connecting to database


princesohrab
 Share

Recommended Posts

hi all, wondering if you would be able to help me..im trying to connect to my database but i keep getting the error message which i echo in the page

<?php DEFINE('DB_USER', 'ok');DEFINE('DB_PASSWORD', 'ok');DEFINE('DB_HOST', 'ok.com.mysql');DEFINE('DB_NAME', 'o_co');$dbconnect = mysql_connect(DB_USER, DB_PASSWORD, DB_HOST, DB_NAME);if (!$dbconnect) {die('Error connecting to the database');} echo 'You have connected successfully';?>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...