$hostnome = '192.185.176.204';
$usernome = 'tookc892';
$senha = '***';
$dbname = 'nome_banco';
$conexao = mysql_connect("$hostnome", "$usernome", "$senha");
$sel_banco = mysql_select_db("$dbname");
You forgot the semicolon after the $ password variable;
Still need to select the database ...
You should run $ connection, so I could leave it without defining it, like this:
$hostnome = '192.185.176.204';
$usernome = 'tookc892';
$senha = '***';
$dbname = 'nome_banco';
mysql_connect("$hostnome, $usernome, $senha");
mysql_select_db("$dbname");
PDO:
<?php
//Arquivo de conexão com o Banco de Dados
try{
$driver = 'mysql';
$host = '192.185.176.204';
$usuario = 'tookc892';
$senha = '***';
$dbname = 'nome_banco';
$conn = new PDO("$driver:host=$host;dbname=$dbname", $usuario, $senha);
} catch (PDOException $e){
echo "Erro ao conectar no banco de dados $dbname <BR/>";
echo $e->getMessage();
die();
}
?>