Quote:
|
Originally Posted by Paul M
The format of mysql_connect() is this ;
PHP Code:
mysql_connect('server', 'user', 'password')
You then use the mysql_select_db() statement to connect to your database.
|
Sorry, just to be annoying here.

The mysql_select_db() function actually does a "use <database>" command.
The mysql_connect() function does establish the connection in the first place.
You can probably test this by using this code:
PHP Code:
<?php
if(!mysql_connect('server', 'username', 'password') {
echo 'I can\'t connect!';
exit;
}
else {
echo 'Connected OK!';
}
?>