I need help, i am trying to connect to an SQL SERVER database using PHP, this is the code i am using:

$connection = mssql_connect("servername","username","password");
if(!$conection){
echo("Connection Failed!");
}else{
$db = mssql_select_db("Tablename",$connection);
}

But this does not work, can anyone offer any advice.