look at the mysql functions in the manual:
more specifically
mysql_connect() and
mysql_select_db().
ex:
Code: Select all
$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
e specifically
mysql_connect() and
mysql_select_db().
ex:
Code: Select all
$host = "127.0.0.1";
$user = "bob"e;;
$pass = &ysql_connect]mysql_connect()[/url] and [url=http://www.php.net/mysql_select_db]mysql_select_db()[/url].
ex:
Code: Select all
$host = "e;127.0.0.1"e;;
$user = "e;bob"e;;
$pass = "e;bobspass"e;;
$db = "e;database";
mysql_connect($host,$user,$pass)
or die(mysql_error());w.php.net/mysql_select_db]mysql_select_db()[/url].
ex:
Code: Select all
$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database"e] and [url=http://www.php.net/mysql_select_db]mysql_select_db()[/url].
ex:
Code: Select all
$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
functions in the manual:
more specifically
mysql_connect() and
mysql_select_db().
ex:
Code: Select all
$host = "e;127.0.0.1"e;;
$user = "e;bob"e;;
$pass = "e;bobspass"e;;
$db = "e;database"e;;
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_sefunctions in the manual:
more specifically [url=http://www.php.net/mysql_connect]mysql_connect()[/url] and [url=http://www.php.net/mysql_select_db]mysql_select_db()[/url].
ex:
Code: Select all
$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
mysql_connect]mysql_connect()[/url] and
mysql_select_db().
ex:
Code: Select all
$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
nect()[/url] and
mysql_select_db().
ex:
Code: Select all
$host = "e;127.0.0.1"e;;
$user = "e;bob"e;;
$pass = "e;bobspass"e;;
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
ically [url=http://www.php.net/mysql_connect]mysql_connect()[/url] and [url=http://www.php.net/mysql_select_db]mysql_select_db()[/url].
ex:
Code: Select all
$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
]
$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_selecuote;;
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
the manual:
more specifically
mysql_connect() and
mysql_select_db().
ex:
Code: Select all
$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
= "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error()ost,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());
$host = "127.0.0.1";
$user = "bob";
$pass = "bobspass";
$db = "database";
mysql_connect($host,$user,$pass)
or die(mysql_error());
mysql_select_db($db)
or die(mysql_error());