Try this:
$link=mysql_connect ("localhost", "sa", "123456") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("pubs");
Also, I typically make the elements variables. So, it would look like this:
$Host="localhost";
$DBase="pubs";
$User = "sa";
$Password = "12345";
$link = mysql_connect($Host, $User, $Password) or die('Could not connect because' . mysql_error());
mysql_select_db($DBase);