Created
February 25, 2010 18:48
-
-
Save mrchrisadams/314888 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php phpinfo() ; ?> | |
<?php | |
$connection_to_server = mysql_connect( '123.123.123.123', 'db_user_name', 'password') or die('Could not connect to mysql server.' ); | |
mysql_select_db('database_name', $connection_to_server) or die('Could not select database.'); | |
if ($connection_to_server) { | |
echo var_dump($connection_to_server); | |
$database_connection = mysql_select_db('database_name', $connection_to_server) or die('Could not select database.'); | |
echo var_dump($database_connection); | |
} else { | |
echo 'no connection'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment