Concordia commented on a Page, Connect to MySQL  -  Jun 27, 2005

Sometimes it\'s a good idea to define the constants, it makes it more secure.

<?

//set the variables as required
define (DBHOST, \'mysite.com\');
define (DBUSER, \'username\');
define (DBPASS, \'password\');
define (DBNAME, \'database_name\');

//do not edit this, it connects the script
mysql_connect (DBHOST, DBUSER, DBPASS);
mysql_select_db (DBNAME) OR die (mysql_error ());

?>

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.